Advertisement
RlCK

Kwadrat *?

Oct 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin>>n;
  9.     for(int i=1;i<=n;i++)
  10.     {
  11.         for(int j=1;j<=n;j++)
  12.         {
  13.             if(i%2==0)
  14.             {
  15.                 if(j%2==0)
  16.                     cout<<"* ";
  17.                 else
  18.                     cout<<"? ";
  19.             }
  20.             else
  21.             {
  22.                 if(j%2==0)
  23.                     cout<<"? ";
  24.                 else
  25.                     cout<<"* ";
  26.             }
  27.         }
  28.         cout<<endl;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement