Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- int L,i,j,y;
- cin >> L;
- int H;
- cin >> H;
- char a[30][900],N[200];
- cin>>N;
- for(i=1;i<=H;i++)
- for(j=1;j<=L*27+1;j++)
- cin>>noskipws>>a[i][j];
- for(i=1;i<=H;i++)
- {
- for(y=1;y<=200;y++)
- {
- if(int(N[y-1])>=65&&int(N[y-1])<=90)
- for(j=(int(N[y-1])-65)*L+2;j<=(int(N[y-1]-64))*L+1;j++)
- cout<<a[i][j];
- else
- if(int(N[y-1])>=97&&int(N[y-1])<=122)
- for(j=(int(N[y-1])-97)*L+2;j<=(int(N[y-1]-96))*L+1;j++)
- cout<<a[i][j];
- else
- for(j=26*L+2;j<=27*L+1;j++)
- cout<<a[i][j];
- if(int(N[y])==0)
- y=201;
- }
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement