Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use if and conditional statements or for while loops cin and cout cuz I'm new to it don't know any more than these for
please use if and conditional statements or for while loops cin and cout cuz I'm new to it don't know any more than these for now
Q1. We can read the sides of a triangle and find out if it is right-angled with the Pythagorean Theorem given below. h= s+t Write a program that reads the sides s, t, and h of an uncertain number of triangles and finds whether they are right angles. As seen in the sample printout, after each triangle, the user says "Do you want to continue?" you are asked. The program ends when the user enters the "N" character. Sample Output: Enter the two sides of the triangle: 3 4 Enter the hypotenuse of the triangle: 5 Right-angled triangle Would you like to continue? (Y/N): Y Enter the two sides of the triangle: 78 Enter the hypotenuse of the triangle: 11 Not a right-angled triangle Would you like to continue? (Y/N): Y Enter the two sides of the triangle: 9 3 Enter the hypotenuse of the triangle: 4 Not a right-angled triangle Would you like to continue? (Y/N): N C:\Users\b.kocacinar\source epos\Lab01 Exercise\x64\Debug\Labe1 Exercise.exe (process 4732) exited with code 0. Press any key to close this window
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