#include<iostream>
#include<cmath>
using namespace std;
double hypotenuse(double s1, double s2){
double h = pow(s1, 2) + pow(s2, 2);
return sqrt(h);
}
int main(){
cout<<"Hypotenus: "<<hypotenuse(3,4)<<endl;
cout<<"Hypotenus: "<<hypotenuse(5,12)<<endl;
cout<<"Hypotenus: "<<hypotenuse(8,15)<<endl;
}
Comments
Leave a comment