السوال:
Write a program that asks the user to enter the lengths of three sides of a triangle, then displays a message to indicate whether the triangle is a right triangle or not.
Hints:
-The triangle is right triangle when the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides.
-Lengths of the triangle should be positive numbers.
محاولتى :
#include <iostream>
using namespace std;
int main()
{
int a,c,d;
cout<<"enter the lengths three side";
cin>>a,b,c;
if(a*a==((b+c)*(b+c)))
cout<<"triangle is a right ";
else
cout<<"not"
return 0 ;
}
