Question: How do I write the code for this in C++ programming? Only can use switch statements, for an while loops. No strings or global functions

How do I write the code for this in C++ programming? Only can use switch statements, for an while loops. No strings or global functions allowed. The number generator has to be inside a function.
Enter your date of birth (dd):1 Enter month now (mm):1 Enter the year now (yyyy): 2000 enter month y):2000 ******************************************************** You were born on 1st day of January 2000 In words, you were born on day One in January of 2000 ******************************************************** You will get 5 chances to guess the number generated by me. The number is between 1 and 30 (both inclusive). After every incorrect, you will get a clue. After 3 chances, you could use an additional clue. Best of luck Pick a number between 1 and 30: 1 Go higher Pick a number between 1 and 30: 2 Go higher Pick a number between 1 and 30: 10 Let me give you another clue -----Think of an even number and ----- Go lower Pick a number between 1 and 30: 8 Go lower Pick a number between 1 and 30: 6 You should have gone lower - the actual number is 4 Sorry - better luck next time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
