Given numbers x, y, and target, return whichever of x and y is closer to the target. If they have the same distance, return the smaller of the two.

Complete the following file:

prog.cpp

#include <iostream> #include <cmath> #include <algorithm> using namespace std; double closerToTarget(double x, double y, double target) {
}