// Performs the same function as the program switch.cpp, but uses // if else if instead. #include void main(){ char p; cout << "Input Y for yes, or N for no: "; cin >> p; if (p=='y' || p=='Y') cout << "YES\n"; else if (p=='n' || p=='N') cout << "NO\n"; else cout << "Not a valid reply\n"; }