Answer to Question #314221 in C++ for Rohan

Question #314221

You are asked to draw the following stick figure on the screen-Design the problem and draw the structure chart.


1
Expert's answer
2022-03-19T05:14:35-0400

Here is program:

int main()
{
    int j = 0;
    int i = 0;
    int n = 0;
    int m = 0;
    int k = 0;
    cout << "Enter size height triangle:";
    cin >> n;
    cout << "Enter size weigth triangle:";
    cin >> m;
    for (i = 0; i < n, k < m; i++)
    {
        for (j = 0; j <= k; j++)
            cout << "*";
        k++;
        cout << endl;
    }
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog