Yasha swam in a pool the size of the NxM meters and was tired. At this...

80.2K

Verified Solution

Question

Programming

Yasha swam in a pool the size of the NxM meters and was tired.At this point, he discovered that he was at an X-meter distancefrom one of the long sides (not necessarily from the nearest one)and the Y meters from one of the short sides. What is the minimumdistance Yasha must travel to get out of the pool to theside?
Input format
The program receives the entry of the number N, M, X, Y.

python

Answer & Explanation Solved by verified expert
4.0 Ratings (528 Votes)
NfloatinputEnter Value of N taking input for N MfloatinputEnter Value of M taking input for M XfloatinputEnter Value of X taking input for    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students