I want to make an output like a Christmas Tree
but...my code shows only half of it...
*
**
***
****
*****
What's wrong with my loop?
for(x=1;x<=5;++ x){
for(y=0;y<x;++y ){
cout<<"*";
}
cout<<"\n";
}
but...my code shows only half of it...
*
**
***
****
*****
What's wrong with my loop?
for(x=1;x<=5;++ x){
for(y=0;y<x;++y ){
cout<<"*";
}
cout<<"\n";
}
Comment