CS Graphics has contracted you to design a program that will compute and display a monthly calender. The user will enter a year and month. The program will then display that month. For example, if November 2015 is requested, the following will be displayed: November 2015 Sun Mon Tues Wed Thurs Fri Sat 1 3 4 6. 7. 10 11 12 13 14 15 16 17 18 18 20 21 22 23 24 25 26 27 28 29 30 CODE:

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
Using vs I need answer fast
CS Graphics has contracted you to design a program that will compute and display a monthly
calender. The user will enter a year and month. The program will then display that month.
For example, if November 2015 is requested, the following will be displayed:
November
2015
Sun
Mon Tues Wed Thurs Fri
Sat
1
31
4
5
6.
8.
6.
10
11
12
13
14
15
16
17
18
18
20
21
22
23
24
25
26
27
28
29
30
CODE:
Create projects/files named Project1 for the project name and project1_driver.epp for the
driver.
get month from a menu.
get year
only constructs presented thus far may be used
include the usual comment header
use functions
comment code
ERROR CHECK User's INPUT : check that the selection number is valid;
If a non-permissible value is entered, inform the user that the entered value is
unacceptable and request a new acceptable value until one is entered.
The program will run as long as the user wishes
29
Transcribed Image Text:CS Graphics has contracted you to design a program that will compute and display a monthly calender. The user will enter a year and month. The program will then display that month. For example, if November 2015 is requested, the following will be displayed: November 2015 Sun Mon Tues Wed Thurs Fri Sat 1 31 4 5 6. 8. 6. 10 11 12 13 14 15 16 17 18 18 20 21 22 23 24 25 26 27 28 29 30 CODE: Create projects/files named Project1 for the project name and project1_driver.epp for the driver. get month from a menu. get year only constructs presented thus far may be used include the usual comment header use functions comment code ERROR CHECK User's INPUT : check that the selection number is valid; If a non-permissible value is entered, inform the user that the entered value is unacceptable and request a new acceptable value until one is entered. The program will run as long as the user wishes 29
To obtain the correct calendar for the requested year, you must find which day of the week is the
first day of that year. This can be done with the formula below
уear
уear
400
year -
year - 1)*365) + floor
floor
+ floor
+ 1%7
4
100
The corresponding values and the days of the week
Sunday
Monday
1
...
6.
Saturday
You also need to take into account leap years. Use the following conditional to determine if a
given year is a leap year or not.
( !(year % 4) && (year % 100)) || !(year % 400)
Transcribed Image Text:To obtain the correct calendar for the requested year, you must find which day of the week is the first day of that year. This can be done with the formula below уear уear 400 year - year - 1)*365) + floor floor + floor + 1%7 4 100 The corresponding values and the days of the week Sunday Monday 1 ... 6. Saturday You also need to take into account leap years. Use the following conditional to determine if a given year is a leap year or not. ( !(year % 4) && (year % 100)) || !(year % 400)
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY