Right so I am doing one of the programs which test your C++ skills on the forum and I have to have 5 different drinks and let the user pick one of them by entering 1, 2, 3, 4, 5.
I tried just doing it with one option for now but the program just ends as soon as I run it.
This is my code so far
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
usingnamespace std;
int main() {
int drinkNumber;
cout << "What drink would you like? Type one for Coke, two for Water, three for Sprite, four for Fanta and five for Irn Bru. "<<endl;
if (drinkNumber == 1) {
cout << "You have chosen Coke. ";
}
return 0;
}