Question: Complete the following code to draw this triangle based on the input from the user? Please input an integer: 4 Triangle: * * ** void

Complete the following code to draw this triangle based on the input from the user?

Please input an integer: 4

Triangle:

*

*

**

void Free 1(int);

int main()

{

int input;

printf("Please input an integer:");

scanf("%d",Free 2);

drawShape(input);

}

void drawShape(int x){

for(int i=1;iFree 3x; i++) {

for(int j=1;j

printf("Free 5");

}

Free 6( " ");

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!