C++ hypot() Function

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    double x, y, z;

    cout << "Enter Triangle Perpendicular : ";
    cin >> x;
    cout << endl;

    cout << "Enter Triangle Base : ";
    cin >> y;
    cout << endl;

    z = hypot(x, y);

    cout << "Triangle Hypotenuse : " << z << endl;

    return 0;
}

Comments