In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. Write a program that prompts the user to enter the lengths of three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle.
1
Expert's answer
2017-12-27T04:24:46-0500
#include <iostream> #include <math.h> using namespace std;
int main() { double x1, x2, x3; cout << "Input the lengths of three sides of a triangle: \n"; cout << "side 1: "; cin >> x1; cout << "side 2: "; cin >> x2; cout << "side 3: "; cin >> x3;
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments