Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Making pyramid using nested loop 1/2
//g++ 5.4.0 #include <iostream> using namespace std; int main() { int rows=5,space; for(int a=1,b=0;a<=rows;++a,b=0){ for(space=1;space<=rows-a;++space) { cout<<" "; } while(b!=2*a-1){ cout<<"*"; ++b; } cout <<endl; } return 0; }
run
|
edit
|
history
|
help
0
qwerty
Trapping rain water problem
2
horse aand goat working
alternate list
Nth max element in BST
template example
Anagrams WIP
Bimap operations
Funny Saying