Saleh127

Untitled

Apr 25th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. char b[27]= "22233344455566677778889999";
  6. char a[100];
  7. int c,d,e,f,i,j,k,l;
  8. while(scanf("%s",a) == 1)
  9. {
  10. for(i=0; a[i] ; i++)
  11. {
  12. if(a[i]>='A' && a[i]<='Z')
  13. {
  14. printf("%c",b[a[i]-'A']);
  15. }
  16. else
  17. {
  18. printf("%c",a[i]);
  19. }
  20. }
  21. printf("\n");
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment