Question: Q5) Days in a Month Write a program that asks the user to enter the month (letting the user enter an integer in the range

 Q5) Days in a Month Write a program that asks the
user to enter the month (letting the user enter an integer in

Q5) Days in a Month Write a program that asks the user to enter the month (letting the user enter an integer in the range of 1 through 12) and the year. The program should then display the number of days in that month. Use the following criteria to identify leap years 1. Determine whether the year is divisible by 100. If it is, then it is a leap year if and only if it is divisible by 400. For example, 2000 is a leap year but 2100 is not. 2. If the year is not divisible by 100, then it is a leap 2008 is a leap year but 2009 is not. year if and if only it is divisible by 4. For example, Here is a sample run of the program Enter a month (1-12): 2 Ente Enter a year: 2008 Enterl rl 29 days Q6) Write a C++ program to generate three multiplications with numbers generated randomly (numbers between 2 and 12 inclusive). If the child user answers correctly, s/he'll get an encouragement otherwise the correct answer is displayed. Here is a sample run of the program; with user's input is in red Do you want to multip If the user replies by 'n the program is terminated 4 x 3 14 No Dear: 4 x3 12 4 x 5 20 Run Very No Dear: 3 x9 27 Bye Q4) Body Mass Index Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person's BMI is calculated with the following formula: BMI-weight height where weight is measured Kg and height is measured in meter. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person's weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!