
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
*please remember to ask the user to input their initials firstly, and dont use advanced manipulators/tools for this

Transcribed Image Text: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.
January = 1 February = 4
April = 0
July = 0
October =1 November = 4
March = 4
May = 2
August = 3
June = 5
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 January or February, subtract 1.
H. Find the remainder when the Total is divided by 7.
1. Use the remainder to find the day:
0= Saturday
3= Tuesday
6 = Friday
1= Sunday
4= Wednesday 5= Thursday
2= Monday
Input
Your three initials, the month, day, and 4-digit year of the date.
Output
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.
Run
Run with the following data:
3/13/2014 - Thursday
1/1/1996 - Monday
2/2/2000 - Wednesday
12/20/1981 - Sunday
3/17/1895 - X
4/10/2130 -X
14/8/1933 -X
10/33/1920 - X
Turn In
Turn in source code and program output.
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 nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Similar questions
- Any help with this question is greatly appreciated!! Please include screenshots of the code if possible. Thank you!! This is my last question, if possible could I have help with the five sub parts? I know it is usually only 3 sub parts. It would really mean a lot! Thank you!! 1. For this question please write a python coded program for each concept displaying how each one is done. Create it any way you would like and explain your code. -read a file and put some content into a variables-how to create a list of strings-printing the list of strings-how to sort list-select middle few in list to make another listarrow_forwardGeneral Requirements Create a folder named with your surname followed by 2 (example smith2). In this folder, write Python programs to solve the problems described below. Use the suggested names for your programs. Start each program with your name and SPC ID# in a comment. See page 39 for how to write comments. Plan the steps for each program by writing pseudocode at the beginning of your program. See page 34. Write your pseudocode as comments immediately after your name and SPC ID#. Good pseudocode is required for full points. Add more comments in each program to explain what your code is doing. Do not go your own way by writing a program that ignores the requirements. Solve the problem as the requirements specify. Where formatted numbers are required in output, use f-strings as on pages 70-78. When done, you have to zip/compress your folder for submitting. Do this by right-clicking on your folder and selecting "Send to" > "Compressed (zipped) folder". This will make a zip…arrow_forwardI really need help with my Programming assignment this is due tomorrow and I really need help please show me every input that you did to solve this coding.arrow_forward
- Don't you dare give me AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.arrow_forwardHow can an algorithm aid in the development of a good programme? What is the point of initially generating a pseudocode or flowchart? 3.What exactly is design documentation?arrow_forwardStrict Warning ⚠️ don't you dare useany AI tool otherwise I'll report your accountarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

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