Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
half diamond or pyramid
#include<bits/stdc++.h> using namespace std; int main() { int i,j,no; cin>>no; for(i=1;i<=no;i++) { for(j=1;j<=2*no-1;j++) { if(j>=no-(i-1) and j<=no+(i-1)) {cout<<"*";} else{cout<<" ";} } cout<<endl; } return 0; }
run
|
edit
|
history
|
help
1
cotton farm 0.0.1.0
Bitwise - Check power of 2 or not
reverse linked list
1234
string_match
A • Potato Sacks
passing by reference vs passing by value
HashTabFold
Dar
Anagrams