Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. ifstream fin("a1z26.in");
  5. ofstream fout("a1z26.out");
  6.  
  7. int main()
  8. {
  9. int p, n, nr, i;
  10.  
  11.  
  12. fin>>p;
  13. if(p==1)
  14. {
  15. char c;
  16. while(fin>>c)
  17. {
  18. int x=c;
  19. fout<<x-64<<' ';
  20. }
  21. }
  22. else
  23. {
  24. fin>>n;
  25. for(i=1; i<=n; i++)
  26. {
  27. fin>>nr;
  28. fout<<char(nr+64);
  29. }
  30. }
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement