Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
diamond
#include <bits/stdc++.h> using namespace std; int main() { int i,j,number; cin>>number; for(i=1;i<number;i++) { for(j=1; j<2*number-1;j++) { if((j>=number-(i-1)) and (j<=number+(i-1))) {cout<<"*";} else{cout<<" ";} } cout<<endl; } for(i=number;i>0;i--)// { for(j=1; j<2*number-1;j++) { if((j>number-(i-1)) and (j<number+(i-1))) {cout<<"*";} else{cout<<" ";} } cout<<endl; } return 0; }
run
|
edit
|
history
|
help
1
Bucket Graph Creation
StackQuiz
Default_Template
NBiggestNum
32bit
Chinu
D. Traveling Graph
TmpFib
Vector+Memory_Adv_C++_Tutorial
decode