মঙ্গলবার, ৩০ আগস্ট, ২০১৬

UVA 10222 - Decode the Mad man

#include<stdio.h>
#include<string.h>
main()
{
char s[100000]={0};
    while(gets(s))
    {
    long i,l=strlen(s);
    for(i=0;i<l;i++)
    {
    if(s[i]=='e' || s[i]=='E')printf("q");
    if(s[i]=='r' || s[i]=='R')printf("w");
    if(s[i]=='t' || s[i]=='T')printf("e");
if(s[i]=='y' || s[i]=='Y')printf("r");
if(s[i]=='u' || s[i]=='U')printf("t");
if(s[i]=='i' || s[i]=='I')printf("y");
if(s[i]=='o' || s[i]=='O')printf("u");
if(s[i]=='p' || s[i]=='P')printf("i");
if(s[i]=='[') printf("o");
if(s[i]==']') printf("p");
if(s[i]=='d' || s[i]=='D')printf("a");
if(s[i]=='f' || s[i]=='F')printf("s");
if(s[i]=='g' || s[i]=='G')printf("d");
if(s[i]=='h' || s[i]=='H')printf("f");
if(s[i]=='j' || s[i]=='J')printf("g");
if(s[i]=='k' || s[i]=='K')printf("h");
if(s[i]=='l' || s[i]=='L')printf("j");
if(s[i]==';')printf("k");
if(s[i]=='\'')printf("l");
if(s[i]=='c' || s[i]=='C')printf("z");
if(s[i]=='v' || s[i]=='V')printf("x");
if(s[i]=='b' || s[i]=='B')printf("c");
if(s[i]=='n' || s[i]=='N')printf("v");
if(s[i]=='m' || s[i]=='M')printf("b");
if(s[i]==',')printf("n");
if(s[i]=='.')printf("m");
if(s[i]==' ')printf(" ");
}
      printf("\n");
}

}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Factory Pattern

Factory Method  is a creational design pattern that provides an interface for creating objects in a superclass but allows subclasses to alte...