enum fieldType {X, Y, DISTANCE}; struct pointType { double x; double y; double dist; } How far is It's the square the point (x,y) from the origin? root of x +y°, Use a struct to hold the points and...



JUST ONLY USE . Not use class, not use give a choice as to
which way to sort it.


Write a program that reads 10 pairs of Cartesian coordinates from a filecalled "points.txt" andsorts them by increasing x-values, decreasing y-values, and increasing distance from the origin. Use only one sorting routine. Use an enumerated data type to keep track of the field on which the list is being sorted. The number of pairs should be in a global constant c++


enum fieldType {X, Y, DISTANCE};<br>struct pointType<br>{<br>double x;<br>double y;<br>double dist;<br>}<br>How far is<br>It's the square<br>the point<br>(x,y) from<br>the origin?<br>root of x +y°,<br>Use a struct to hold the points and their distances from the origin. You will read the x and<br>y coordinates from a file and then use the Pythagorean theorem to find the distance the<br>point is from the origin.<br>

Extracted text: enum fieldType {X, Y, DISTANCE}; struct pointType { double x; double y; double dist; } How far is It's the square the point (x,y) from the origin? root of x +y°, Use a struct to hold the points and their distances from the origin. You will read the x and y coordinates from a file and then use the Pythagorean theorem to find the distance the point is from the origin.

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here