Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Programmer: Nazmus //Program: Pythagorean Theorem //Website: EasyProgramming.net #include <iostream> #include <math.h> using namespace std; int main() { float a, b, c; cout << "Please input the values of a and b: "; cin >> a >> b; c = a*a + b*b; c = sqrt(c); cout << "The hypotenuse is: " << c << '.' << endl; system("pause"); }