Your objective is to write a program that outputs a calendar for a given month in a given year, given the day of the week on which the 1st of the month fell. The user enters these 3 pieces of information in numeric format (months are: 1-Jan, 2-Feb, etc and days are 1=Sun, 2=Mon, etc...). The program outputs that month's calendar, followed by a sentence indicating on which day the month ended. For example, if the user enters 2 (for the month), 2012, and 4 (for the first of the month), your program outputs something like: Here is the calendar for February of 2012: Mon Tue Wed Thu Fri Sat Sun 5 12 19 26 1 8 6 7 13 14 15 20 21 22 27 28 29 . 2 9 16 23 3 4 10 11 17 18 24 25 The month ends on a Wednesday. As you can see, for the month of February, your program has to decide if the year is leap (29 days) or not. Important: Your program MUST be simple. Points will be deducted for unnecessary complications! Other than i/o statements, all you need to use is some conditional statements (if & switch), and one loop.
Your objective is to write a program that outputs a calendar for a given month in a given year, given the day of the week on which the 1st of the month fell. The user enters these 3 pieces of information in numeric format (months are: 1-Jan, 2-Feb, etc and days are 1=Sun, 2=Mon, etc...). The program outputs that month's calendar, followed by a sentence indicating on which day the month ended. For example, if the user enters 2 (for the month), 2012, and 4 (for the first of the month), your program outputs something like: Here is the calendar for February of 2012: Mon Tue Wed Thu Fri Sat Sun 5 12 19 26 1 8 6 7 13 14 15 20 21 22 27 28 29 . 2 9 16 23 3 4 10 11 17 18 24 25 The month ends on a Wednesday. As you can see, for the month of February, your program has to decide if the year is leap (29 days) or not. Important: Your program MUST be simple. Points will be deducted for unnecessary complications! Other than i/o statements, all you need to use is some conditional statements (if & switch), and one loop.
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...
Related questions
Question
Can you write in C++

Transcribed Image Text:Your objective is to write a program that outputs a calendar for a given month in a given year,
given the day of the week on which the 1st of the month fell. The user enters these 3 pieces of
information in numeric format (months are: 1-Jan, 2-Feb, etc ..., and days are 1=Sun, 2-Mon,
etc...). The program outputs that month's calendar, followed by a sentence indicating on which
day the month ended.
For example, if the user enters 2 (for the month), 2012, and 4 (for the first of the month), your
program outputs something like:
Here is the calendar for February of 2012:
Sun
5
12
19
26
Mon Tue Wed Thu Fri Sat
2
9
15 16
23
18
6
7
13
14
20 21 22
27 28 29
3
10
17
24
The month ends on a Wednesday.
4
11
18
25
As you can see, for the month of February, your program has to decide if the year is leap (29
days) or not. Important: Your program MUST be simple. Points will be deducted for
unnecessary complications! Other than i/o statements, all you need to use is some conditional
statements (if & switch), and one loop.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY