Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Find value in sorted matrix
akshitha
pac update
Scemo
Shuffle algorithm
Identifying polimorphic types without using RTTI or type mappings
ONP
static_cast makes a copy
anagram
BinTraversal v2
Please log in to post a comment.