Originally posted by jerlark386integer3 is still C squared though.
I'm sorry. I was just messing with Jkozzy's mind.
[code]
cout <<"Enter the first side of the right triangle\n";//assign first side
cin >> integer1;//redefine integer1
cout <<"Enter the second side\n";//assign second side
cin >> integer2;//redefine integer2
integer3=(integer1*integer1)+(integer2*integer2);
//finds hypotenuse squared
integer3=(integer4*integer4);//finds hypotenuse
cout <<"The hypotenuse of the right triangle is "<<integer4<<endl;return(0);//indicate that the program has ended successfully
}[/code]
Its a really minor error. You can fix it with this.
[code]
cout <<"Enter the first side of the right triangle\n";//assign first side
cin >> integer1;//redefine integer1
cout <<"Enter the second side\n";//assign second side
cin >> integer2;//redefine integer2
integer3=(integer1*integer1)+(integer2*integer2);
//finds hypotenuse squared
//integer3=(integer4*integer4);//finds hypotenuse//get rid of this line
cout <<"The hypotenuse of the right triangle is the square root of"<<integer3<<endl;return(0);//indicate that the program has ended successfully
}
[/code]
So you can't use the sqrt or the breakdown version in my other post. Then don't. Without those, you're pretty much out of luck anyway. Besides your teach would'nt liked all those gotos anyway. If you give an answer that sounds good, then it'll probably be better than nothing. Your teacher will laugh, but your answer will be 'valid'.Who does'nt love a good linguistic hack.
💃
Pythagoran Theorem is a squared plus b squared equals c squared. a and b are already squared, and the answer you show is c squared.... the square root of c needs to be found for the program to be complete 😬