#include // for cout << and cin >> #include // for toupper(char) char menuOption() { // The user eventually enters either an n, and o, or an s. // POST: Return an upper case N, O or S char option; do { cout << "Enter N)ew, O)pen, S)ave: "; cin >> option; option = toupper(option); // toupper is from ctype.h } while (option != 'N' && option != 'O' && option != 'S'); return option; } int main() { // POST: Shows the user selected option cout << "The user entered " << menuOption() << endl; return 0; }