Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4.  
  5. int main()
  6. {
  7. char ka[1000000];
  8. char ib[1000000];
  9.  
  10. scanf("%[^\n]", ka); getchar();
  11. char length = strlen(ka);
  12. for(int i=0; i<length; i++){
  13.  
  14. if (ka[i]=='I' || ka[i]=='i'){
  15. ib[i]='1';
  16. }
  17. else if (ka[i]=='R' || ka[i]=='r'){
  18. ib[i]='2';
  19. }
  20. else if (ka[i]=='E' || ka[i]=='e'){
  21. ib[i]='3';
  22. }
  23. else if (ka[i]=='A' || ka[i]=='a'){
  24. ib[i]='4';
  25. }
  26. else if (ka[i]=='S' || ka[i]=='s'){
  27. ib[i]='5';
  28. }
  29. else if (ka[i]=='G' || ka[i]=='g'){
  30. ib[i]='6';
  31. }
  32. else if (ka[i]=='T' || ka[i]=='t'){
  33. ib[i]='7';
  34. }
  35. else if (ka[i]=='B' || ka[i]=='b'){
  36. ib[i]='8';
  37. }
  38. else if (ka[i]=='P' || ka[i]=='p'){
  39. ib[i]='9';
  40. }
  41. else if (ka[i]=='O' || ka[i]=='o'){
  42. ib[i]='0';
  43. }
  44. else if(ka[i]==' '){
  45. ib[i]=' ';
  46. }
  47. else if (ka[i]=='1')
  48. ib[i]='i';
  49. else if (ka[i]=='2')
  50. ib[i]='r';
  51. else if (ka[i]=='3')
  52. ib[i]='e';
  53. else if (ka[i]=='4')
  54. ib[i]='a';
  55. else if (ka[i]=='5')
  56. ib[i]='s';
  57. else if (ka[i]=='6')
  58. ib[i]='g';
  59. else if (ka[i]=='7')
  60. ib[i]='t';
  61. else if (ka[i]=='8')
  62. ib[i]='b';
  63. else if (ka[i]=='9')
  64. ib[i]='p';
  65. else if (ka[i]=='0')
  66. ib[i]='o';
  67. else
  68. ib[i]=ka[i];
  69. }
  70. for(int i=0; i<length; i++){
  71. if(islower(ib[i]))
  72. ib[i]=toupper(ib[i]);
  73.  
  74. printf("%c", ib[i]);
  75. }
  76.  
  77. printf("\n");
  78.  
  79. return 0;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement