You are asked to draw the following stick figure on the screen-Design the problem and draw the structure chart.
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;
}
Comments
Leave a comment