Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. string s;
  4. char alfabet[2900]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  5. char * c;
  6. int p;
  7. char z;
  8. ifstream in("a1z26.in");
  9. ofstream out("a1z26.out");
  10. int main()
  11. {
  12.  
  13. in>>p;
  14. if(p==1)
  15. {
  16. while(in>>z)
  17. {
  18. for(int j=0;j<strlen(alfabet);j++)
  19. {
  20. if(alfabet[j]==z)
  21. {
  22. out<<j+1<<" ";
  23. break;
  24. }
  25. }
  26.  
  27.  
  28. }
  29. return 0;
  30. }
  31. int a,b;
  32. in>>a;
  33. for(int i=1;i<=a;i++)
  34. {
  35. in>>b;
  36. out<<alfabet[b-1];
  37. }
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement