Skip to content

Instantly share code, notes, and snippets.

@mbcarruthers
Created June 8, 2017 01:15
Show Gist options
  • Save mbcarruthers/b7ea386c1f97999e46608936cf781f98 to your computer and use it in GitHub Desktop.
Save mbcarruthers/b7ea386c1f97999e46608936cf781f98 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
using namespace std;
int main () {
int chooseAnother;
bool isTrue = true;
while(isTrue == true) {
int answer;
cout << "would you like to get Coke,sparkling water,v8,Juicey juice,orange soda?" << endl;
cin >> answer;
if (answer > 5) {
cout << "that is not an option" << endl;
}
if (answer == 1) {
cout << "you have choosen coke" << endl;
}
if (answer == 2) {
cout << "you have choosed sparkling water" << endl;
}
if (answer == 3) {
cout << "you have choosen v8" << endl;
}
if (answer == 4) {
cout << "you have choosen Juicey juice" << endl;
}
if (answer == 5) {
cout << "you have choosen orange soda" << endl;
}
cout<<"would you like to have another option?"<<endl;
cin>>chooseAnother;
if(chooseAnother == false) {
isTrue = false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment