(General math) The roads of Kansas are laid out in a rectangular grid at exactly one-mile intervals, as shown in Figure. Pete drives his pickup x miles east and y miles north to get to his friend Joe’s farm. Both x and y are integer numbers. Using this information, write, test, and run a C++ program that prompts the user for the values of x and y, and then uses this formula to find the shortest driving distance across the fields to Joe’s farm:
distance = 
Round the answer to the nearest integer value before it’s displayed.
Figure: Illustration

We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.