zoukankan      html  css  js  c++  java
  • poj2538

    简单题

    View Code
    #include <iostream>
    #include
    <cstdio>
    #include
    <cstdlib>
    #include
    <cstring>
    using namespace std;

    char key[4][20];

    int main()
    {
    //freopen("t.txt", "r", stdin);
    strcpy(key[0], "1234567890-=");
    strcpy(key[
    1], "QWERTYUIOP[]\\");
    strcpy(key[
    2], "ASDFGHJKL;'");
    strcpy(key[
    3], "ZXCVBNM,./");
    char st[1000];
    while (gets(st) && strcmp(st, "") != 0)
    {
    int len = strlen(st);
    for (int i = 0; i < len; i++)
    {
    if (st[i] == ' ')
    {
    putchar(
    ' ');
    continue;
    }
    bool found = false;
    for (int j = 0; j < 4; j++)
    {
    int len1 = strlen(key[j]);
    for (int k = 0; k < len1; k++)
    if (key[j][k] == st[i])
    {
    putchar(key[j][k
    - 1]);
    found
    = true;
    break;
    }
    if (found)
    break;
    }
    }
    putchar(
    '\n');
    }
    return 0;
    }

  • 相关阅读:
    Spring总结
    Json
    智能搜索
    Ajax
    include指令和include标签的区别
    jsp状态管理
    Model1
    JavaBean
    JSP内置对象的解析
    镜像地址管理工具nrm
  • 原文地址:https://www.cnblogs.com/rainydays/p/2050383.html
Copyright © 2011-2022 走看看