#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
float leg1, leg2, hyp;
cout << "Enter one leg ";
cin >> leg1;
cout << "Enter one leg ";
cin >> leg2;
if ((leg1 < 0) || (leg2 < 0))
hyp = 0;
else
hyp = (sqrt((float)leg1*leg1 + (float)leg2*leg2));
cout << "The hypotenuse is " << hyp << endl;
return 0;
}
i think i may have posted that code correctly...sorry if i didn't. anyway, i have to change this code i made for part of my homework so that it doesn't output anything to the screen or returns anything as a return value but returns the hypotenuse in a reference parameter. i don't know what that means. can someone please help me?