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
Empty C++
Raw AVL
ThreadPool
Stats - Central Limit Theorem - Normal Distribution with multiple items
Breakfast Static Function
Ptrtest
FindMedian
TupleCPP
single_digit
fibonacci