Write a C# console program that prints a calendar for a given year. Call this program calendar. The program prompts the user for two inputs:  1) The year for which you are generating the calendar.  2) The day of the week that January first is on, you will use the following notation to set the day of the week:  0 Sunday 1 Monday 2 Tuesday 3 Wednesday  4 Thursday 5 Friday 6 Saturday Your program should generate a calendar like the one shown in the example output below. The calendar should be printed on the screen. Your program should be able to handle leap years. A leap year is a year in which we have 366 days. That extra day comes at the end of February. Thus, a leap year has 366 days with 29 days in February. A century year is a leap year if it is divisible by 400. Other years divisible by 4 but not by 100 are also leap years.

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

Write a C# console program that prints a calendar for a given year. Call this program calendar. The
program prompts the user for two inputs:
 1) The year for which you are generating the calendar.
 2) The day of the week that January first is on, you will use the following notation to set the day of the
week:
 0 Sunday 1 Monday 2 Tuesday 3 Wednesday
 4 Thursday 5 Friday 6 Saturday
Your program should generate a calendar like the one shown in the example output below. The calendar
should be printed on the screen. Your program should be able to handle leap years. A leap year is a year in
which we have 366 days. That extra day comes at the end of February. Thus, a leap year has 366 days with
29 days in February. A century year is a leap year if it is divisible by 400. Other years divisible by 4 but
not by 100 are also leap years. 

Your program should clearly describe and display the instructions on how to run the program. It should run
until the user want to quit, which you need to use do…while loop as required. You also need to check
input validation for correct input information (the day of week).
This program is required to use enumeration type for month title, and switch for display month days
with correct form as show in example below. You cannot use any C# “DateTime” class library for
this assignment. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 9 images

Blurred answer
Similar questions
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