Display the corrected value of the number of days

Assignment Help Computer Engineering
Reference no: EM132208444

Write this program in C: A professor will assign homework today and does not want it due on anybody's holy day.

The professor enters today's day of the week (0 for Sunday, 1 for Monday, etc.) and the number of days, D, to allow the students to do the work, which may be several weeks. Calculate the day of the week on which the work would be due.

If that day is someone's holy day-Friday (Moslems),Saturday (Jews), or Sunday (Christians)-add enough days to D to reach the following Monday. Print the corrected value of D and the day of the week the work is due.

1) Use a switch statement for calculating the number of days based on today's day.

2) If the entered day for today is not in the range of 0 to 6, display an error message and abort the program.

3) Display the corrected value of the number of days and the day of the week the work is due. For example, if today is Thursday, and the number of days D is 8, then the due date falls on Friday, then 3 days will be added to reach the following Monday. So the corrected value of D is 11.

Reference no: EM132208444

Questions Cloud

Define teh case for claiming the labor markets : In which case we can claim the labor markets in Athens and Thessaloniki (cities in Greece) in are separate from each other at least in the short run?
How immunizations affect the lymphatic system : Describe how immunizations affect the lymphatic system and how they affect the immune system. Describe differences between intracellular and extracellular fluid
Write a function that adds up the sum and returns it back : Write a program in C language that uses a struct and binary tree. Ask the student to enter their name and what they got on their midterm.
From which country to which country will the capital move : Assume Market A represents Egyptian Labor Market (at equilibriam w/p=9$), while Market B represent the Jordanian Labor Market (at equilibrium w/p =8$).
Display the corrected value of the number of days : Write this program in C: A professor will assign homework today and does not want it due on anybody's holy day.
Find demand as functions of choice variables : Consider two firms i= 1,2 in a certain industry. They want to maximize their profit, they have no marginal cost of producing goods.
Get the make and model of the ten cars as structures : Write a program in C++ to get the Make and Model of the ten cars as structures members by user and display it on the screen by Function.
Calculate and display the revenue and profit on each item : A program is required to read a series of product sales records from an input file specified by the user.
Explain the effect of sympathetic stimulation : Explain the effect of both sympathetic and parasympathetic stimulation on each behavior you choose

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd