UVA 10082 - WERTYU

UVA Sep 1, 2020

Problem PDF

Solution:

#include
int main()
{
    char c;
    while ( scanf("%c",&c)==1)
    {
        if (c=='1')
            printf("`");
        if (c=='2')
            printf("1");
        if (c=='3')
            printf("2");
        if (c=='4')
            printf("3");
        if (c=='5')
            printf("4");
        if (c=='6')
            printf("5");
        if (c=='7')
            printf("6");
        if (c=='8')
            printf("7");
        if (c=='9')
            printf("8");
        if (c=='0')
            printf("9");
        if (c=='-')
            printf("0");
        if (c=='=')
            printf("-");
        if (c=='W')
            printf("Q");
        if (c=='E')
            printf("W");
        if (c=='R')
            printf("E");
        if (c=='T')
            printf("R");
        if (c=='Y')
            printf("T");
        if (c=='U')
            printf("Y");
        if (c=='I')
            printf("U");
        if (c=='O')
            printf("I");
        if (c=='P')
            printf("O");
        if (c=='[')
            printf("P");
        if (c==']')
            printf("[");
        if (c=='\\')
            printf("]");
        if (c=='S')
            printf("A");
        if (c=='D')
            printf("S");
        if (c=='F')
            printf("D");
        if (c=='G')
            printf("F");
        if (c=='H')
            printf("G");
        if (c=='J')
            printf("H");
        if (c=='K')
            printf("J");
        if (c=='L')
            printf("K");
        if (c==';')
            printf("L");
        if (c=='\'')
            printf(";");
        if (c=='X')
            printf("Z");
        if (c=='C')
            printf("X");
        if (c=='V')
            printf("C");
        if (c=='B')
            printf("V");
        if (c=='N')
            printf("B");
        if (c=='M')
            printf("N");
        if (c==',')
            printf("M");
        if (c=='.')
            printf(",");
        if (c=='/')
            printf(".");
        if (c==' ')
            printf(" ");
        if (c=='\n')
            printf("\n");
    }
    return 0;
}

https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10082/10082.cpp

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.