Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6. char data[]="`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
  7. char text[1000];
  8. int i=0;
  9. cin.getline(text,1000);
  10. while(text[i] != '\0')
  11. {
  12. text[i]=tolower(text[i]);
  13. if(text[i]==' ')
  14. cout<<" ";
  15. while(text[i] != '\0')
  16. {
  17. for(int j =0 ;j<=47;j++)
  18. {
  19. if(text[i]==data[j])
  20. {
  21. cout << data[j-2];
  22. break;
  23. }
  24. }
  25. break;
  26. }
  27. i++;
  28. }
  29. cout<<endl;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement