Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- int main()
- {
- char ka[1000000];
- char ib[1000000];
- scanf("%[^\n]", ka); getchar();
- char length = strlen(ka);
- for(int i=0; i<length; i++){
- if (ka[i]=='I' || ka[i]=='i'){
- ib[i]='1';
- }
- else if (ka[i]=='R' || ka[i]=='r'){
- ib[i]='2';
- }
- else if (ka[i]=='E' || ka[i]=='e'){
- ib[i]='3';
- }
- else if (ka[i]=='A' || ka[i]=='a'){
- ib[i]='4';
- }
- else if (ka[i]=='S' || ka[i]=='s'){
- ib[i]='5';
- }
- else if (ka[i]=='G' || ka[i]=='g'){
- ib[i]='6';
- }
- else if (ka[i]=='T' || ka[i]=='t'){
- ib[i]='7';
- }
- else if (ka[i]=='B' || ka[i]=='b'){
- ib[i]='8';
- }
- else if (ka[i]=='P' || ka[i]=='p'){
- ib[i]='9';
- }
- else if (ka[i]=='O' || ka[i]=='o'){
- ib[i]='0';
- }
- else if(ka[i]==' '){
- ib[i]=' ';
- }
- else if (ka[i]=='1')
- ib[i]='i';
- else if (ka[i]=='2')
- ib[i]='r';
- else if (ka[i]=='3')
- ib[i]='e';
- else if (ka[i]=='4')
- ib[i]='a';
- else if (ka[i]=='5')
- ib[i]='s';
- else if (ka[i]=='6')
- ib[i]='g';
- else if (ka[i]=='7')
- ib[i]='t';
- else if (ka[i]=='8')
- ib[i]='b';
- else if (ka[i]=='9')
- ib[i]='p';
- else if (ka[i]=='0')
- ib[i]='o';
- else
- ib[i]=ka[i];
- }
- for(int i=0; i<length; i++){
- if(islower(ib[i]))
- ib[i]=toupper(ib[i]);
- printf("%c", ib[i]);
- }
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement