i need to do a java program that finds the hypotenuse of a right triangle itried like 5 times but i cant do it can someone plz help me.
knuckerbuck 0 Newbie Poster
Recommended Answers
Jump to PostA^2 + B^2 = C^2
Math.pow(num, power);
Show what you have done.
Jump to PostAsk user to input one side of triangle and store in a variable x
Ask user to input second side of triangle and store in a variable y
Square x and y and add them together, and then find the square root of that sum
Print out the result
All 8 Replies
server_crash 64 Postaholic
Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

iamthwee
server_crash 64 Postaholic

iamthwee
server_crash 64 Postaholic

iamthwee
jwenting 1,905 duckman Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.