Question
1) [8 points] You've been hired by Map Masters to write a C++ console application that calculates and displays the distance between two points on
1) [8 points] You've been hired by Map Masters to write a C++ console application that calculates and displays the distance between two points on a map. Prompt the user for four integer coordinates:
x1
y1
x2
y2
Calculate the distance in kilometers from (x1, y1) to (x2, y2). See www.mathsisfun.com/algebra/distance-2-points.html for background information. Use function sqrt(
x1
y1
x2
y2
Distance
And three columns:
A left-justified label.
A right-justified value.
A left-justified units (output manipulators not needed here, just place one space before the units name to separate it from the second column).
Define constants for the column widths. Format all real numbers to one decimal place.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started