Advertisement
DrDiagramm

Untitled

Feb 7th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x;
  8.  
  9. cout << "Coke=1; Sprite=2; Fanta=3 \nBeer=4; Ice Tea= 5 \nInsert Number for your Drink: ";
  10. cin >> x;
  11.  
  12. switch (x) {
  13. case 1:
  14. cout << "Coke" << endl;
  15. break;
  16. case 2:
  17. cout << "Sprite" << endl;
  18. break;
  19. case 3:
  20. cout << "Fanta" << endl;
  21. break;
  22. case 4:
  23. cout << "Beer" << endl;
  24. break;
  25. case 5:
  26. cout << "Ice Tea" << endl;
  27. break;
  28. default:
  29. cout << "Error. choice was not valid, here is your money back." << endl;
  30.  
  31.  
  32.  
  33. }
  34.  
  35.  
  36. cout << endl;
  37. system("pause");
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement