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