Commit f1438aca authored by Walterio Montanez's avatar Walterio Montanez

autosave

parent b59add93
......@@ -142,13 +142,17 @@ pair<double,double> altAndAziPair (double altitude, string Direction) {
double Azi;
pair<double,double> aziPair;
cout << "Enter the altitude at which you are looking : ";
if (!(cin >> altitude)) { // validates that numbers were entered and checks input
cerr << "Error! Please enter a valid integer." << endl;
cin.clear();
cin.ignore(1000, '\n');
continue;
}
do {
cout << "Enter the altitude at which you are looking (0-90): ";
if (!(cin >> altitude)) { // validates that numbers were entered and checks input
cerr << "Error! Please enter a valid integer." << endl;
cin.clear();
cin.ignore(1000, '\n');
continue;
} else if (altitude < 0 || altitude >= 90) {
cout << "Please put in a valid value." << endl;
}
} while (false)
do {
cout << "Enter a cardinal direction (North, South, East, West, Northeast, Southeast, Southwest, or Northwest): ";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment