subject
Computers and Technology, 02.03.2020 23:21 maren17

Write a program that reads in the following data, all entered on one line with at least one space separating them: a) an integer representing a month b) an integer representing the day of the month c) an integer representing a year 1. Check that the month is between 1 and 12. If it’s not print an error message. 2. Day cannot be 0 or less nor can it be more than 31 for all months. Print an error message if these conditions occur. If day is in the range of 0 and 31, you will still need to check other conditions as noted below in 4. 3. Year cannot be less than 1. Print an error message if that occurs. If any one of these three conditions occurs, only one error message should print and no further code should be executed. If everything is good so far, then continue as below: 4. Check that day is correct for the month. Remember the poem "30 days has September, April, June and November, All the rest have 31 except February which has 28 but in a leap year has 29"

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, yoyo9661
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, robert7248
Competent nonverbal communication involves interacting with others in a manner that is appropriate for which of the following? select all that apply. situation task individuals
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, kp2078
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, sophx
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
Write a program that reads in the following data, all entered on one line with at least one space se...

Questions in other subjects:

Konu
Mathematics, 03.02.2022 05:20