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

I need to correct the written part of my midterm for extra credit.THere is a que

ID: 3609841 • Letter: I

Question

I need to correct the written part of my midterm for extra credit.THere is a question that I answered totally wrong. I still can'tfigure out the right answer.

Code:
int main()
{
    int step_num, x_count;
    step_num = 1;

    while (step_num < 5)
    {
        cout << " ";
        x_count = 1;
       
        while (x_count <=step_num)
        {
            cout<< "X";
           ++x_count;
        }
       
        ++step_num;
    }
   
    cout << " ";
    return 0;
}

Questions:
1. List the values of step_num
2. List the values x_count
3. Write an output.

Here're my answers:
1. 1,2,3,4
2. 1,2
3. x
    x


I would highly appreciate if you explain your answer to me.
Thanks!

Explanation / Answer

I need to correct the written part of my midterm for extra credit.THere is a que

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