1.write a program that prompts the user, within a while loop, for a birth month
ID: 3620349 • Letter: 1
Question
1.write a program that prompts the user, within a while loop, for a birth month and birth year,and then calculates and displays the corresponding age.Note:do the initial prompt outside the loop.use the following formula to calculate the age:
age=currentyear-birthyear+(currentmonth-birthmonth)/12
2.check for user input error in a do while loop.if the birth year or month is not valid then prompt the user again.
3.end the loop when the user enters 0 for the birthyear, and 0 for the birth month.