Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- std::string value(int x) {
- std::string res = "";
- switch (x) {
- case 1:
- res = "Hello";
- break;
- case 2:
- res = "What";
- break;
- case 3:
- res = "Are";
- break;
- case 4:
- res = "You";
- break;
- case 5:
- res = "Doing";
- break;
- default:
- res = "Invalid";
- }
- return res;
- }
- // checked on: https://godbolt.org/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement