Calculate the following integer quantaties

Assignment Help C/C++ Programming
Reference no: EM13939583

Revernd Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c, and d be integers defined as follows:

a = the number of a month of the year, with March = 1, April = 2, and so on, with January and February being counted as months 11 and 12 of the preceeding year.

b = the day of the month

c = the year of the century

d = the century

For example, July 31, 1929 gives a = 5, b = 31, c = 29, d = 19; January 3, 1988 gives a = 11, b = 3, c = 87, d = 19. Noe calculate the following integer quantaties:

w = the inter quotient (13a - 1)/5

x = the integer quotient c/4

y = the integer quotient d/4

z = w + y + b + c - 2d

r = z reduced modulo 7; that is, r is the remainder of z divided by 7: r = 0 represents Sunday; r = 1 represents Monday, andso on

Write a function day_of_the_Week () that receives the name of a month, the day of the month, and a year and returns the name of the day of the week on which that date fell or will fall. Write a program that inputs several strings representing dates, calls the function day_of_the_Week() and displays the day returned by the function.

a. Verify that December 12, 1960 fell on a Monday, and that January 1 1991 fell on a Tuesday.

b. On what day of the week did January 25, 1963 fall?

c. On what day of the week did June 2, 1964 fall?

d. On what day of the week did July 4, 1776 fall?

e. On what day of the was February 8, 1962?

Reference no: EM13939583

Questions Cloud

What types of crimes will be the most prevalent : What types of crimes will be the most prevalent? How will new technologies affect law enforcement and individual rights? How will police departments and prosecutorial agencies respond to new vanguards in criminal justice
The current yield on these bonds : Backwater Corp. has 6 percent coupon bonds making annual payments with a YTM of 5.2 percent. The current yield on these bonds is 5.55 percent. How many years do these bonds have left until they mature?
What theory (somatic mutation model) supposed to accomplish : What is a theory (somatic mutation model) supposed to accomplish? What is the purpose of competing theories? When can you discard a theory? What constitutes "success?"
Labor production rate for making : Estimate the direct cost of materials, equipment and labor for wood forms for a concrete foundation wall of a building whose outside dimensions are 46 ft. 6 in. wide, 88 ft. 0 in. long, 9 ft. 8 in. high, and 9 in. thick. Labor production rate for mak..
Calculate the following integer quantaties : For example, July 31, 1929 gives a = 5, b = 31, c = 29, d = 19; January 3, 1988 gives a = 11, b = 3, c = 87, d = 19. Noe calculate the following integer quantaties
Survey of entertainment technology : Use the internet to research the people who operate a radio station (the radio station management and staff - there are roughly a dozen key positions).
Expect the rate of return to be for the investor : We have a callable 25 year, 2% bond X and associates selling at $1500. If the instrument is callable after 4 years at $1050, what will the yield to call and the yield to maturity be? What do we expect the rate of return to be for the investor of X?
Letter to deliver to the homes and apartments : You have decided to write a promotional sales letter to deliver to the homes and apartments in the area. Your letter should be attractive and include details that you think is necessary to boost business and attract more customers.
What are data declaration statements : I need an example of a flow chart and specification sheet of a C program.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Program that displays the ball at a random

Write a C++ program that displays the ball at a random location and then makes the ball move down to the bottom of the screen. When the ball reaches the bottom of the screen, it should start these actions over again, appear-ing at another random l..

  A temperature control system consists of four thermostats

A temperature control system consists of four thermostats controlling three heating units. The thermostat contacts are set to close at 50°, 60°, 70°, and 80°F, respectively. The PLC ladder logic program is to be designed so that at a temperature belo..

  Program that can serve as a simple calculator

Write a program that can serve as a simple calculator. This calculator keeps track of a single number (of type double) that is called result and that starts out as 0.0. Each cycle allows the user to repeatedly add, subtract, multiply, or divide by..

  Make an explicit statement of the invariant of the set class

Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.

  Program that generates 50,000 random integers from 1 to 6

Program that generates 50,000 random integers from 1 to 6 (inclusive). Count the number of times that each number occurs and output the totals

  Dynamically allocates an array large enough

Write a program that dynamically allocates an array large enough to hold a number of test score. The size of the array should be input by the user

  Creating a malware analysis environment

1. What are two items to consider when creating a malware analysis environment?

  Writing a program that creates a linked list

Writing a program that creates a linked list from 100 randomly generated numbers and sorts the using a heap. One heap in ascending order and one heap in descending order. Then displays the original linked list and both sorted lists.

  What are four examples of how direction can be used

What are four examples of how "direction" can be used in an effective publication?

  What are the advantages of using variables in a data type

A data type describes the format and size of a data item. However, it does not define the type of operation a data item needs to perform. Do you agree with this statement? Why or why not? What are the advantages of using variables in a data type?

  Write a c program that will calculate the gross pay of a

write a c program that will calculate the gross pay of a set of employees.for each employee the program should prompt

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