Question
Write a C++ program that will prompt the user to enter a year and produce a calendar for that year. Do not forget that years
Write a C++ program that will prompt the user to enter a year and produce a calendar for that year. Do not forget that years that are divisible by 4 but not divisible by 100 unless they are divisible by 400 are leap years. The first day of the year can be calculated using the following formula: W = ((29 - 2*C + y + y/4 + C/4)%7 + 7) % 7 where Y is the year C = (Y-1) / 100, the century y = (Y-1) % 100 / denotes the integer division % denotes the integer remainder (mod) W is the week day (0=Sunday, ..., 6=Saturday).Note that Sundays should be displayed in red color. For displaying different colors in your output you can use the header file colors.h that you can find on your intranet. Feel free to practice with different colors for this assignment. Assessment Criteria The marks (maximum 100) for this coursework assignment will be based on the following assessment criteria: Working version of the program 70% Identifiers, comments and style 30% Note: You are ONLY allowed to include the libraries: iostream, iomanip, and windows.h.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started