Answers for "Code converter C++ to python"

0

Code converter C++ to python

#include <iostream>
#include <cmath>
using namespace std;
int main()
{

	int a,b,c;


	cout << "Enter the length of three sides. " << endl;
	cin >> a >> b >>c;
	 if(pow(c,2)-pow(b,2)-pow(a,2) == 0)
		 cout << "It is a right triangle " << endl;
	 else if (pow(b,2)-pow(a,2)+pow(c,2) == 0 )
		 cout << "It's a right triangle" << endl;
	 else if (pow(c,2) -pow(b,2)+pow(a,2)==0 )
		 cout << "It's a right triangle" << endl;
	 else
		 cout << "It is not a right triangle. " << endl;






	return 0;
}
Posted by: Guest on August-05-2021

Code answers related to "Code converter C++ to python"

Python Answers by Framework

Browse Popular Code Answers by Language