Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started