fork download
  1. #include<stdio.h>
  2. #include<ctype.h>
  3. #include<string.h>
  4. main()
  5. {
  6. int i,j,k,l1,l2;
  7. char s[50]={"`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./"},x[1000];
  8.  
  9. l2=strlen(s);
  10. while( gets(x) )
  11. {
  12. l1=strlen(x);
  13.  
  14. for(i=0;i<l1;i++)
  15. {
  16. if( isspace(x[i]) )
  17. printf(" ");
  18.  
  19. else if( x[i]=='\\' )
  20. printf("]");
  21.  
  22. else
  23. {
  24. for(j=1;j<l2;j++)
  25. {
  26. if(x[i]==s[j])
  27. {
  28. printf("%c",s[j-1]);
  29. break;
  30. }
  31. }
  32.  
  33. }
  34.  
  35. }
  36. printf("\n");
  37. }
  38. return 0;
  39. }
  40.  
Success #stdin #stdout 0s 10320KB
stdin
O S, GOMR YPFSU/
1234567890
-=[]\;',./
BCDEFGHIJKLMNOPRSTUVWXY
stdout
I AM FINE TODAY.
`123456789
0-P[]L;M,.
VXSWDFGUHJKNBIOEARYCQZT