Computer Science, asked by kundumou39, 1 month ago

Write a C++ program to input the three sides of a triangle and display whether it forms a right-angled triangle. (Note. if a ^ 2 + b ^ 2 = c ^ 2 , it forms a right-angled triangle. It is also called as Pythagoras theorem.)​

Answers

Answered by miteshpatel0042
5

Answer:

#include <iosteam>

using namespace std;

int main(){

cout<<"Write the measurement of the sides a,b and c of triangle ABC."<<endl;

Int a,b,c;

cout<<"Side a = "<<cin>>a<<endl;

cout<<"Side b = "<<cin>>b<<endl;

cout<<"Side c = "<<cin>>c<<endl;

if (a^2 + b^2 = c^2) {

cout<<"This is a right angled triangle."<<endl;

}

else {

cout<<"This is not a right angled triangle."<<endl;

}

return 0;

}

Similar questions