#include #include #include using namespace std; int main() { ifstream file; file.open("Test.txt"); string stuff; if (!file) { // do stuff when the file open fails cout << "File doesn't exist..." << endl; } else { if (cin >> stuff) { cout << stuff; } } int choice, input; do { cout << "Enter your medium choice: " << endl << endl; cout << "1 for air" << endl; cout << "2 for water" << endl; cout << "3 for steel" << endl; cout << "0 to exit" << endl; cin >> choice; if (choice > 3) { cout << "Invalid Selection" << endl; } if (choice == 0) { cout <<"Thank you, goodbye!" << endl; exit(0); } } while (choice < 4); cout << "Enter the distance in feet, a sound wave will travel in the selected medium: " << endl; cin >> input; return 0; }