C++ Programming Problem #3 : Ascending Asterisk (Christmas Tree Shape)

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 Problem Overview Variables n : integer > value : input number a : integer > value : 1st […]

More