1234567891011121314151617181920212223242526
#include <iostream> using namespace std; /* * This is a quiz. */ int main(){ int option; cout << "Please select an option: \n 1) Wipe Drive \n 2) Wipe while preserving installation \n 3) Do nothing" << endl; cin >> option; cin.ignore(); if (cin == 1) cout << "Wipe progressing.." << endl; else if (cin == 2) cout << "Preserving Install" << endl; else cout << "Aborted" << endl; return 0;
12345678910111213141516171819202122
#include <iostream> using namespace std; int main() { int option; cout << "Please select an option: \n 1) Wipe Drive \n 2) Wipe while preserving installation \n 3) Do nothing" << endl; cin >> option; // cin.ignore(); you dont need this if(option == 1) cout << "Wipe progressing.." << endl; else if(option == 2) cout << "Preserving Install" << endl; else cout << "Aborted" << endl; return 0; }
if(option == 1)
if (cin == 1)