Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

I have attached the homework. Please provide me with the correct solution

I have attached the homework. Please provide me with the correct solution.

Thank you.

1CMIS 102 Hands-On LabWeek 3OverviewThis hands-on lab allows you to follow and experiment with the critical steps of developing a programincluding the program description, analysis, test plan, design, pseudocode visualization, andimplementation with C code.The example provided uses mathematical operators and variable types.Program DescriptionThis program will calculate the area of a right triangle. The program will ask the user to enter the baseand height and then use these values to calculate and then print the area of the triangle. The design stepwill include pseudocode.AnalysisI will use sequential programming statements.I will define two float numbers for the base and height: base, height.Float numbers were selected as opposed to integers to make sure triangles of all dimensions arepossible and not just whole numbers.Float number will store the area: areaThe area will be calculated by this formula:Area = ½ * (base * height)For example if the base was 4.2 and the height was 5.3 the area would be calculated as:Area = ½ * (4.2 * 5.3) = ½ * (22.26) = 11.13Test PlanTo verify this program is working properly the following base and height values could be used fortesting:Test CaseInputExpected Output1Base=10.1 Height = 12.2Area = 61.612Base=2.67 Height = 3.23Area = 4.313Base=100.0 Height = 400.0Area =20000.0
Background image of page 1
2Pseudocode// This program will calculate the area of a right triangle.// Declare variablesDeclare base, height, area as Float// Ask User for InputsWrite “Enter triangle base:”Input baseWrite “Enter triangle height:”Input height// Set value of areaSet area=1/2*(base * height)// Print areaPrint “Area of triangle is “ + areaC CodeThe following is the C Code that will compile in execute in the online compilers.// C code// This program will calculate the area of a right triangle.// Developer: Faculty CMIS102// Date: Jan 31, XXXX#include <stdio.h>int main (){/* variable definition: */float base, height, area;/* Prompt user for base */printf(“Enter the base of the triangle: \n”);// Input the basescanf(“%f”, &base);/* Prompt user for height */printf(“Enter the height of the triangle: \n”);// Input the basescanf(“%f”, &height);// Calculate the Areaarea= 0.5 * (base * height);// Print the resultprintf(“Area is : %f\n”, area);return 0;}
Background image of page 2
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"