Question: Prepare a new test table with at least 3 distinct test cases listing input and expected output for the perimeter of a triangle. /// C
Prepare a new test table with at least 3 distinct test cases listing input and expected output for the perimeter of a triangle.
/// 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; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
