Skip to content

Instantly share code, notes, and snippets.

@itsjohncs
Created October 22, 2012 06:21
Show Gist options
  • Save itsjohncs/3929957 to your computer and use it in GitHub Desktop.
Save itsjohncs/3929957 to your computer and use it in GitHub Desktop.
SI Classroom Session 4 - Conditional Review
#include <iostream>
using namespace std;
int main() {
int user_input = 0;
cout << "Please enter a number: ";
cin >> user_input;
if (user_input <= 1) {
if (user_input > 0) {
cout << "Apple Sauce" << endl;
} else {
cout << "Lemon Sauce" << endl;
}
} else if (user_input == -3) {
cout << "Peach Sauce" << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment