Advertisement
Guest User

Main Code

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