Advertisement
Guest User

aaaaaaa

a guest
Nov 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int w,k;
  7.     int t;
  8.     cin>>t;
  9.     for(int i=0; i<t; i++)
  10.     {
  11.         cin>>w;
  12.         cin>>k;
  13.         cout<<endl;
  14.         int z=0;
  15.         for(int i=0; i<w; i++)
  16.         {
  17.                 if(z==0)
  18.                 {
  19.                     cout<<"****";
  20.                     z=1;
  21.                 }
  22.                 for(int n=1; n<k; n++)
  23.                 {
  24.                     if(i==0)
  25.                     {
  26.                     cout<<"***";
  27.                     }
  28.                 }
  29.                 cout<<endl;
  30.                 for(int q=0; q<k; q++)
  31.                 {
  32.                     if(q==0)
  33.                     {
  34.                         cout<<"*..*";
  35.                     }
  36.                     else
  37.                         cout<<"..*";
  38.                 }
  39.                 cout<<endl;
  40.                 for(int r=0; r<k; r++)
  41.                 {
  42.                     if(r==0)
  43.                     {
  44.                         cout<<"*..*";
  45.                     }
  46.                     else
  47.                         cout<<"..*";
  48.                 }
  49.                 cout<<endl;
  50.                 for(int w=0; w<k; w++)
  51.                 {
  52.                     if(w==0)
  53.                     {
  54.                         cout<<"****";
  55.                     }
  56.                     else
  57.                         cout<<"***";
  58.                 }
  59.         }
  60.     }
  61.  
  62.     return 0;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement