Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- char str[] = "`1234567890-=qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:ZXCVBNM<> ";
- char str1[] = "`123qjlmfp/[]456.orsuyb;=789aehtdck-0zx,inwvg'~!@#QJLMFP?{}$%^>ORSUYB:+|&*(AEHTDCK)ZX<INWVG ";
- int ascii[260];
- char input[1002];
- void init(int len)
- {
- int i;
- for(i=0;i<len;i++)
- {
- ascii[str[i]] = str1[i];
- }
- }
- int main()
- {
- int len = strlen(str),i,a;
- char ch = '"';
- init(len);
- while(gets(input))
- {
- len = strlen(input);
- for(i=0;i<len;i++)
- {
- if(input[i]=='\\')
- {
- printf("\\");
- }
- else if(input[i]=='"')
- {
- printf("_");
- }
- else if(input[i]=='?')
- {
- printf("%c",ch);
- }
- else
- {
- printf("%c",ascii[input[i]]);
- }
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement