برنامه ای به زبان ++C بنویسید که سه عدد صحیح غیر صفر را از کاربر گرفته و تعیین کنید که ایا این سه عدد می توانند اضلاع یک مثلث قائم الزاویه باشند یا خیر؟
#include<iostream>
using std::cout;
using std::endl;
using std::cin;
int main()
{
int a, b, c;
do{
cout << "Enter three integers: ";
cin >> a >> b >> c;
} while (a <= 0 || b <= 0 || c <=0);
if(c*c == a*a + b*b)
cout << "The three integers are the"
<< " sides of a right triangle\n";
else
cout << "The three integers are not the"
<< " sides of a right triangle\n";
cout << endl;
return 0;
}