Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- string s;
- char alfabet[2900]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- char * c;
- int p;
- char z;
- ifstream in("a1z26.in");
- ofstream out("a1z26.out");
- int main()
- {
- in>>p;
- if(p==1)
- {
- while(in>>z)
- {
- for(int j=0;j<strlen(alfabet);j++)
- {
- if(alfabet[j]==z)
- {
- out<<j+1<<" ";
- break;
- }
- }
- }
- return 0;
- }
- int a,b;
- in>>a;
- for(int i=1;i<=a;i++)
- {
- in>>b;
- out<<alfabet[b-1];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement