Question: It needs to be in C++ Even though there are many possible routes, the distance only depends on the differences h2h1 and v2v1. However, you
It needs to be in C++ 
Even though there are many possible routes, the distance only depends on the differences h2h1 and v2v1. However, you need to take the absolute value because the differences might be negative. Complete the following program that prints the number of blocks traveled, given the origin and destination of the trip (which will change as your code is tested). distance.cpp \#include \#include using namespace std; int main() // Other values will be set during testing. // Your program needs to work with any coordinates. int h1=3; int v1 =4; int h2=4; int v2=4 // Compute the distance between the two positions cout "Distance: " distance endl; return ; \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
