Assignment Plan and code a C program utilizing selection structure. Write an interactive C program to determine the day of the week for any given date from 1900-2099. Following are the steps you should use: A Input the date in 3 separate parts, month, day and 4-digit year. Error check to make sure the month is between 1 and 12, the day between 1 and 31, and the year between 1900-2099. if there is an error, identify the type of error and stop the program. B. if the data is good, divide the last two digits of the year by 4. Store the quotient (ignoring the remainder) in Total. For example, for 1983, divide 83 by 4 and store 20 in Total. C Add the last 2 digits of the year to Total. D. Add the two digits of the day of the month to Total. E Using the following table, find the "value of the month" and add it to Total. January1 February4 April0 uly 0 October 1 November -4 March4 May 2 August 3 June 5 September -6 December 6 F. If the year is 2000 or later, add 6. f the year is 2000 exactly and the month is January or February, subtract 1. G. Then, determine if the year is a leap year. A leap year is divisible by 4 but not divisible by 100. if it is a leap year and the month is lanuary or February, subtract 1. H. Find the remainder when the Total is divided by 7. L Use the remainder to find the day 0Saturday 1 Sunday 3-Tuesday 6-Friday 2 Monday 4Wednesday 5-Thurday Ingd Your three initials, the month, day, and 4digt year of the date. Qutput All user prompts. Your 3 intials. All the input fields. The day of the week of the date entered if the data is valid. Appropriate error messagef the data is invalid. Be sure your output fle contains user prompts and what was entered by the user in addition to the results of your program processing Run Run with the following data 3/1/2014 - Thursday 1/1/1-Monday 2/2/2000-Wednesday 12/20/11Sunday 3/17/1-X 4/10/2130-X 14/1933-X 10/31/1920-K Turn in Turn in source code and program output

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

please do this short program in c++, dont forget to ask user to input their initials firstly and avoid using string/advanced manipulators. thanks so much

 

Assignment
Plan and code a C+ program utilizing selection structure. Write an interactive C program to determine the day of the
week for any given date from 1900-2099. Following are the steps you should use:
A Input the date in 3 separate parts, month, day and 4 digit year. Error check to make sure the month is between
1 and 12, the day between 1 and 31, and the year between 1900-2099. If there is an error, identify the type of
error and stop the program.
B. If the data is good, divide the last two digits of the year by 4. Store the quotient (lgnoring the remainder) in
Total. For example, for 1983, divide 83 by 4 and store 20 in Total.
C. Add the last 2 digits of the year to Total.
D. Add the two digits of the day of the month to Total.
E. Using the following table, find the "value of the month" and add it to Total.
Avenuga t- Aenuer
Sun
March4
0- An
October 1 November4
May=2
August 3
September -6
December 6
F. If the year is 2000 or later, add 6. If the year is 2000 exactly and the month is January or February, subtract 1.
G. Then, determine if the year is a leap year. A leap year is divisible by 4 but not divisible by 100. if it is a leap year
and the month is lanuary or February, subtract 1.
H. Find the remainder when the Total is divided by 7.
L. Use the remainder to find the day:
Aepsan E
4Wednesday 5 Thursday
Aepu9
Arpung Aepanoes 0
Aepuo
Your three initials, the month, day, and 4-digit year of the date.
All user prompts. Your 3 initials. All the input fields. The day of the week of the date entered if the data is valid.
Appropriate error message if the data is invalid. Be sure your output file contains user prompts and what was entered by
the user in addition to the results of your program processing
ung
Run with the following data
Aepuo-941//
Kepsaupam-00or/t/t
12/20/1981-Sunday
Turn in
ndyno ueoud pue apoo anunos u un
Transcribed Image Text:Assignment Plan and code a C+ program utilizing selection structure. Write an interactive C program to determine the day of the week for any given date from 1900-2099. Following are the steps you should use: A Input the date in 3 separate parts, month, day and 4 digit year. Error check to make sure the month is between 1 and 12, the day between 1 and 31, and the year between 1900-2099. If there is an error, identify the type of error and stop the program. B. If the data is good, divide the last two digits of the year by 4. Store the quotient (lgnoring the remainder) in Total. For example, for 1983, divide 83 by 4 and store 20 in Total. C. Add the last 2 digits of the year to Total. D. Add the two digits of the day of the month to Total. E. Using the following table, find the "value of the month" and add it to Total. Avenuga t- Aenuer Sun March4 0- An October 1 November4 May=2 August 3 September -6 December 6 F. If the year is 2000 or later, add 6. If the year is 2000 exactly and the month is January or February, subtract 1. G. Then, determine if the year is a leap year. A leap year is divisible by 4 but not divisible by 100. if it is a leap year and the month is lanuary or February, subtract 1. H. Find the remainder when the Total is divided by 7. L. Use the remainder to find the day: Aepsan E 4Wednesday 5 Thursday Aepu9 Arpung Aepanoes 0 Aepuo Your three initials, the month, day, and 4-digit year of the date. All user prompts. Your 3 initials. All the input fields. The day of the week of the date entered if the data is valid. Appropriate error message if the data is invalid. Be sure your output file contains user prompts and what was entered by the user in addition to the results of your program processing ung Run with the following data Aepuo-941// Kepsaupam-00or/t/t 12/20/1981-Sunday Turn in ndyno ueoud pue apoo anunos u un
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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