Newer
Older
#include <iostream>
#include <cmath>
int main() {
int a, b;
std::cout << "Enter the lengths of the two sides of the right triangle:" << std::endl;
std::cout << "Side a: ";
std::cin >> a;
std::cout << "Side b: ";
std::cin >> b;
double hypotenuse = sqrt(a * a + b * b);
std::cout << "The length of the hypotenuse is: " << hypotenuse << std::endl;
return 0;
}