Answer:
C++ code is explained below
Explanation:
/Remove the following line
//if not using visual studio.
#include "stdafx.h"
//Import the required header files.
#include <iostream>
using namespace std;
//Define the main function.
int main(void)
{
//Define the variables.
double side1, side2, side3;
//Prompt the user to enter the sides of the triangle.
cout << "Enter the side of the triangle:" << endl;
cout << "Enter first side of triangle:" << endl;
cin >> side1;
cout << "Enter second side of triangle:" << endl;
cin >> side2;
cout << "Enter third side of triangle:" << endl;
cin >> side3;
cout << endl;
//Check if the triangle sides are valid
if ((side1 + side2 > side3) &&
(side1 + side3 > side2) &&
(side2 + side3 > side1))
{
//Check the condition for right angle triangle
if ((side3*side3 == (side1*side1 + side2*side2)) ||
(side2*side2 == (side3*side3 + side1*side1)) ||
(side1*side1 == (side3*side3 + side2*side2)))
//Display that the triangle is right-angled triangle.
cout << "It is a right-angled triangle." << endl;
else
//Display that the triangle is not the right-//angled triangle.
cout << "It is not a right-angled triangle."
<< endl;
}
else
//Display not the valid side.
cout << "Not a valid side." << endl;
//Remove the following line if
//not using visual studio.
system("pause");
return 0;
}