#include #include using namespace std; int main() { double miles {0}; cout << "How many miles do you need to travel today?\n"; cin >> miles; if (!cin) { cerr << "Sorry, that wasn't a valid whole number.\n"; return EXIT_FAILURE; } if (miles < 0) { cerr << "Sorry, you must travel some distance.\n"; return EXIT_FAILURE; } double fare {3 + (miles - 1) * 3.5}; cout << "That will be $" << fare << ".\n"; }