Advertisement
elephantsarecool

cross

Oct 8th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int n;
  6.     cin>>n;
  7.     for(int i=0;i<n;i++)
  8.     {
  9.         for(int j=0;j<n;j++)
  10.             if(i==n/2 || j==n/2)cout<<'*'; else cout<<' ';
  11.         cout<<endl;
  12.     }
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement