PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07 26 1998. The program will print the number of days elapsed from 01 January of that year, i.e. January 1st is always 1 and December 31 is either 365 or 366, depending on if leap year or not.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 5E: a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered...
icon
Related questions
Question
QUESTION 1
PROBLEM:
Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07 26 1998. The program will print
the number of days elapsed from 01 January of that year, i.e. January 1st is always 1 and December 31 is either 365 or 366, depending
on if leap year or not.
SPECIFICATIONS:
- You may only use the codes that we studied under our lectures
- All lines of codes should have a comment.
- Save your cpp file as Surname - PE (Example: Pangaliman - PE.cpp)
TEST CASES:
If a user inputs a valid int month, date, and year:
Enter MM: 05
Enter DD: 18
Enter YYYY: 1995
Result: 138 days
If a user inputs an invalid int month, date, and year:
Enter MM: 02
Enter DD: 29
Enter YYYY: 1997
Result: INVALID
Transcribed Image Text:QUESTION 1 PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07 26 1998. The program will print the number of days elapsed from 01 January of that year, i.e. January 1st is always 1 and December 31 is either 365 or 366, depending on if leap year or not. SPECIFICATIONS: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment. - Save your cpp file as Surname - PE (Example: Pangaliman - PE.cpp) TEST CASES: If a user inputs a valid int month, date, and year: Enter MM: 05 Enter DD: 18 Enter YYYY: 1995 Result: 138 days If a user inputs an invalid int month, date, and year: Enter MM: 02 Enter DD: 29 Enter YYYY: 1997 Result: INVALID
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT