Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i,j,k,Q,x,y,spasi;
- char tanda;
- cin >>Q ;
- for(i=1; i<=Q;i++)
- {
- cin >> tanda >> x >> y;
- cout <<"Testcase-"<< i << endl;
- if (tanda == 'p')
- spasi = 2;
- else
- spasi = 1;
- for(j = 0; j<x;j++)
- {
- if(spasi == 2)
- {
- if(j%2 == 1) cout << ' ';
- }
- else
- if(j%2 == 0) cout << ' ';
- for(k=0; k<y;k++)
- {
- if(k%2 == 1) cout << '#';
- else
- if(k%2 == 0) cout << '*';
- };
- cout << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement