hypotenuse - cout<<"The hypotenuse is"<<...

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 << "The hypotenuse is: " << hypotenuse(side1, side2); return 0; } double hypotenuse (double side1, double side2) { return sqrt(side1*side1 + side2*side2); }...
View Full Document

This note was uploaded on 04/24/2010 for the course COS 120 taught by Professor Bonev during the Fall '08 term at American University in Bulgaria.

Ask a homework question - tutors are online