using c++
sample program
Question 1 We are in the month of February, we want the user to enter a number N and guess which month it will be in N months, then your program will check whether the user's guess is correct or wrong and display a message accordingly. e.g. Since if we are in February, if the user enters 8 for N and April for the guessed month, meaning that 8 months from now, it will be April. Your program should find out that the user's guess is wrong and display a message. See below examples of input/output. Notes: - Use the assert function to make sure that the number of months entered by the user is positive. - Use the modulo operator and a switch statement to find the correct month. - e.g. if we are in February, then after 8 months the month will be October as (2+8)%12=10: the 8th month following February is October. After 11 months from February as (2+11)%12=1 : The 11 th Month from February is January. After 41 months from February, the month is July as (2+41)%12=7 - Include the header file to be able to use the type string: \#include. - Declare the 12 months as constants of type string. e.g. const string This_month = "February" ; const string Jan= "January" ; const string jan = "January" ; - Your program should consider months with uppercase first letter or lowercase first letter. e.g. given the above two constants Jan and jan, if guessedMonth is the name of the variable containing the guessed month entered by the user, then you can make this test: if(guessedMonth == Jan || guessedMonth == jan) to check that the user input is "January" or "january" Enter a positive number of months : 8 Enter a month : September You guessed the wrong month. We are in February. So, after 8 months, it will be October Enter a positive number of months : 11 Enter a month : march You guessed the wrong month. We are in February. So, after 11 months, it will be January Enter a positive number of months : 41 Enter a month : july You guessed the correct month. Effectively, as we are in February after 41 months, it will be July