Question: Triangle Area Calculator The given program is supposed to calculate the area of a righttriangle. Correct all syntax errors preventing the program fromcompiling and running.Then

Triangle Area Calculator

The given program is supposed to calculate the area of a righttriangle. Correct all syntax errors preventing the program fromcompiling and running.Then run the program, testing it to find anylogic errors (semantic errors) that give incorrect results andcorrect them.

7 { 8 9 10 11 12 13 14 15 16 17

7 { 8 9 10 11 12 13 14 15 16 17 18 19 1 #include 2 using namespace std; 3 4 //Program to find the area of a right triangle 5 6 int main() double area; int sidel, side2; //Declaration of variables cout < < "CSC 175 Area of Triangle Calculator "; //print header cout < < " Enter the length of side 1: "; cin < < side1; cout < < " Enter the length of side 2: "; cin < < side2; //collection of user input 20 21 area (side1)(side2)/2; 22 23 24 25 \\calculation of area cout.precision(2); cout < < "sidel " < < area < < "sidel < < endl;" 11 26 cout < < "Hypotenuese : < < hypotenuese < < endl; 27 28 return 0; 29 } 30 main.cpp Load default template...

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 Programming Questions!