Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

Students also viewed these Programming questions

Question

LG4 Understand the different kinds of common stock values.

Answered: 1 week ago