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 #include  int 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; } 

/// C code // This program will calculate the area of a

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 int main (void) int i,j float f,g f = 3.0; f=f+j/i; g= (f + j )/i; f f,g is %f,%f ", f,g); print f ( "value return 0 Describe specificll and in your own words, why arethe values of f and gdiferent? Support your experimentation with a screen capture of executing the code

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!