Write a program C++ that receives an integer from the user and then prints the \
ID: 3663767 • Letter: W
Question
Write a program C++ that receives an integer from the user and then prints the "*" as in the 1st attached picture bellow : The number of "*" in the first line is the last one in line is the same number the entrance decreasing in each line using the comands ( do, while or for , cin, cout, using namespace std, int main)
----------------------------
See the below code I just need (decreasing) stars fix on it
#include <iostream>
using namespace std;
int main()
{
int number,c, k;
cout<<"Enter number of rows"<<endl;
cin>>number;
for ( c = 1 ; c <= number ; c++ )
{
for( k = 1 ; k <= c ; k++ )
cout<<"*";
cout<<endl;
}
return 0;
}
Explanation / Answer
#include using namespace std; int main() { int i,j,rows; coutrows; for(i=1;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.