C++ Programming Problem #3 : Ascending Asterisk (Christmas Tree Shape)
[fb_button]Problem # 3: Ascending Asterisk (Christmas Tree Shape)
//---www.skellainnovations.com---// #include<iostream> #include<conio.h> using namespace std; int main() { int a,b,c,n; cout<<"Enter a Number: "; cin>>n; for(a=1;a<=n;a++){ for(b=a;b<n;b++){ cout<<" ";} for(c=1;c<=a;c++){ cout<<"* ";} cout<<endl;} getch (); } //---www.skellainnovations.com---//
Breakdown of Codes