Advertisement
Koalaazz

Assignment 2 - Switch

Sep 10th, 2020
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. //assignment 2.1
  2.  
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int score;
  9.  
  10. cout << " Enter a score between 0 and 1000:\n";
  11. cin >> score;
  12. switch (score)
  13.  
  14. {
  15. //score 0
  16. case 0:
  17. cout << "dude I think you shouldnt even get a point for spelling your name right";
  18. break;
  19.  
  20. //score 1 - 250
  21. case 1 ... 250:
  22. cout << "not to bad for a 3 year old xdxd";
  23. break;
  24.  
  25.  
  26. //score 251 - 500
  27. case 251 ... 500:
  28. cout << "so close to being awesome";
  29. break;
  30.  
  31.  
  32. //score 501 - 750
  33. case 501 ... 750:
  34. cout << "learning you are my young padawan";
  35. break;
  36.  
  37.  
  38. //score 751 - 999
  39. case 751 ... 999:
  40. cout << "you have skills, give yourself to the dark side!!!!";
  41. break;
  42.  
  43.  
  44. //score 1000
  45. case 1000:
  46. cout << "mace windu?";
  47. }
  48. return -0;
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement