Advertisement
Guest User

Main Code

a guest
Nov 17th, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <string>
  2.  
  3. std::string value(int x) {
  4. std::string res = "";
  5. switch (x) {
  6. case 1:
  7. res = "Hello";
  8. break;
  9. case 2:
  10. res = "What";
  11. break;
  12. case 3:
  13. res = "Are";
  14. break;
  15. case 4:
  16. res = "You";
  17. break;
  18. case 5:
  19. res = "Doing";
  20. break;
  21. default:
  22. res = "Invalid";
  23. }
  24. return res;
  25. }
  26.  
  27. // checked on: https://godbolt.org/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement