hypotenuse - cout <<...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# include <iostream> # include <cmath> using namespace std; double hypotenuse (double, double); int main(void) { double side1, side2; cout << "Enter the two sides of the triangle: "; cin >> side1 >> side2;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout &lt;&lt; &quot;The hypotenuse is: &quot; &lt;&lt; hypotenuse(side1, side2); return 0; } double hypotenuse (double side1, double side2) { return sqrt(side1*side1 + side2*side2); }...
View Full Document

Ask a homework question - tutors are online