Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char data[]="`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
- char text[1000];
- int i=0;
- cin.getline(text,1000);
- while(text[i] != '\0')
- {
- text[i]=tolower(text[i]);
- if(text[i]==' ')
- cout<<" ";
- while(text[i] != '\0')
- {
- for(int j =0 ;j<=47;j++)
- {
- if(text[i]==data[j])
- {
- cout << data[j-2];
- break;
- }
- }
- break;
- }
- i++;
- }
- cout<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement