Hypotenuse calculation of triangle using user defined functions

Hypotenuse calculation using user defined functions:

// Find Hypotenuse

#include<iostream>
#include<cmath>
using namespace std;
double hypotenuse(double a, double b);
void main()
{
double side1, side2;
cout << "Enter First Side : ";
cin >> side1;
cout << "Enter Second Side : ";
cin >> side2;
cout << endl;
cout << "Hypotenuse : " << hypotenuse(side1,side2);
cout << endl;
}
double hypotenuse(double a, double b)

{
double c;
c = sqrt(pow(a,2) + pow(b,2));
return c;
}

Download:

To download this code click on the given link below, also bookmark this website for more informative content.

Comments

Popular posts from this blog

How to Run Assembly Language Programming Code In Visual Studio 2019

How to Display Table of any Number in Assembly Language

How to Display Character in Assembly language