Answered step by step
Verified Expert Solution
Link Copied!

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

student submitted image, transcription available below

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

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

Step: 3

blur-text-image

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

An Introduction To Statistical Methods And Data Analysis

Authors: R. Lyman Ott, Micheal T. Longnecker

7th Edition

1305269470, 978-1305465527, 1305465520, 978-1305269477

More Books

Students also viewed these Databases questions

Question

What is a Hadley cell? How does it work?

Answered: 1 week ago