Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program C++ that receives an integer from the user and then prints the \

ID: 3662773 • Letter: W

Question

Write a program C++ that receives an integer from the user and then prints the "*" as in the attached picture Note : The number of "*" in the first line is the last one in line is the same number the entrance incrementally in each line using the comands ( do, while, cin, cout, using namespace std, int main) example below photo

example of a past HW
I need same comands as this

#include <iostream>
using namespace std;

int number;
int main() {

    do

    {
    cout<<"Enter new Number: ";
        cin>>number;

        }
        while(number!=99);
        cout<<"stopping number is 90";

        return 0;
}

Explanation / Answer

As per given problem and sampled code updated the code to print the stars in a patteren as given in sampled
ouput. this below c++ code will do the operation.

See the below code

#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;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote