Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
swastic
//g++ 7.4.0 #include <iostream> using namespace std; int main() { int i,j,n; cin>>n; if(n%2==0){cout<<"i am really sorry🥸";} else { for(i=0;i<n;i++) { for(j=0;j<n;j++) { if (i==n/2){cout<<"*";} //else{cout<<" ";} else if (j==n/2){cout<<"*";} // else{cout<<" ";} else if(j==0 and i<n/2){cout<<"*";} // else{cout<<" ";} else if(i==0 and j>n/2 and j<n){cout<<"*";}//else{cout<<" ";} else if (i==(n-1) and j<n/2){cout<<"*";}//else{cout<<" ";} else if (j==(n-1) and i>n/2 and i<n){cout<<"*";}//else{cout<<" ";} else{cout<<" ";} } cout<<endl; }} return 0; }
run
|
edit
|
history
|
help
-1
12535
Testing C++
Search in a rotated sorted array two methods
cppPyTeleAbs
Christopher-Stellar
bitmap with pairs
First and last Occurence of an Element
StackBubLink
p30
Clementina