Question: /// C code // This program will calculate the area of a right triangle. // Developer: Faculty CMIS102 // Date: Jan 31, XXXX #include int
/// C code // This program will calculate the area of a right triangle. // Developer: Faculty CMIS102 // Date: Jan 31, XXXX #includeint main () { /* variable definition: */ float base, height, area; /* Prompt user for base */ printf("Enter the base of the triangle: "); // Input the base scanf("%f", &base); /* Prompt user for height */ printf("Enter the height of the triangle: "); // Input the base scanf("%f", &height); // Calculate the Area area= 0.5 * (base * height); // Print the result printf("Area is : %f ", area); return 0; }

What is this line of code doing? scanf ("%f", &height); How would you change this line if you wanted to input an Integer as opposed to a float? What are the values of f and g after executing the following C? #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
