Problem Statement Create a program that will determine the day a particular date falls. Input Input starts with a number N and is followed by N triples (a,b,c), where a, b and c represents the day, month and year. Output The output will be the day when a particular date falls. If the given date is invalid (invalid date, invalid month) then the output should be invalid date Limits 1

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 28PE
icon
Related questions
Question
Problem Statement
Create a program that will determine the day a particular date falls.
Input
Input starts with a number N and is followed by N triples (a,b,c), where a, b and c represents the day, month and year.
Output
The output will be the day when a particular date falls. If the given date is invalid (invalid date, invalid month) then the output should be invalid date
Limits
1<N< 20
1600 \le c \le 2600
Notes
Problems will have test cases that are not listed in their specification. Your solution must produce the right output for these hidden test cases.
Sample Input #1
5
28 10 1982
30 2 2019
29 13 2020
1 1 1599
2 2 2601
Sample Output #1
thursday
invalid date
invalid date
invalid date
invalid date
Transcribed Image Text:Problem Statement Create a program that will determine the day a particular date falls. Input Input starts with a number N and is followed by N triples (a,b,c), where a, b and c represents the day, month and year. Output The output will be the day when a particular date falls. If the given date is invalid (invalid date, invalid month) then the output should be invalid date Limits 1<N< 20 1600 \le c \le 2600 Notes Problems will have test cases that are not listed in their specification. Your solution must produce the right output for these hidden test cases. Sample Input #1 5 28 10 1982 30 2 2019 29 13 2020 1 1 1599 2 2 2601 Sample Output #1 thursday invalid date invalid date invalid date invalid date
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
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
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr