#include <iostream>
using namespace std;

int main() {
    int x;
    cin>>x;
    int n;
    n=x/2 + 1;


    for(int i=1; i<=x; i++){
        for( int j=1; j<=x; j++){
            if(i==n || j==n) { cout<<"* ";  }
                else {cout<<"  "; }
          
                }  //2nd loop 
        cout<<endl;
                    
               
       
    }   //1st loop
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: