You are on page 1of 1

#include <iostream>

using namespace std;


int main()
{ int n, m, i, j;
cin>>n;
if(n%2==0)n++; cout<<endl;
for(i=1;i<=(n-1);i++){
for(j=1;j<=((n-i)/2);j++)
{ cout<<" ";
} for(j=1;j<=i;j++){ cout<<"x"; }
cout<<endl; i++; };
for(j=1;j<=n;j++){ cout<<"x"; } cout<<endl;
for(i=(n-1);i>=1;i--)
{ for(j=1;j<=((n-i+1)/2);j++){ cout<<" "; }
for(j=1;j<

You might also like