Use the convention that all years have 360 days

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

Write a function named days() that determines the number of days since January 1, 1900 for any data passed as a structure. Use the Date structure

struct Date

{

int month;

int day;

int year;

};

In writing the days() function, use the convention that all years have 360 days and each month consists of 30 days. The function should return the number of days for any Date structure passed to it. Write a main () function to test your function.

b)

Write a program named difDays() that calculates and returns the difference between two dates . Each date is passed to the function as a structure using the following global type:

struct Date

{

int month;

int day;

int year;

};

The difDays() function should make two calls to the days() function written for Problem a

Reference no: EM13165950

Questions Cloud

Analyzed from contract participants point of views : Construction contract claims have been analyzed from contract participants point of views, this research is willing to discuss the construction claims the proper application from the contractor point of view in order to save the contractor rights ..
Cell array named carray that will hold numbers and text : In MATLAB, write a program to create a cell array named CArray that will hold numbers and text. Create a loop that first asks for an 'n' to be entered for a number or an 's' to be entered for a text string. If neither an n nor an s is entered, end..
Pension plan and live-weight scalers and cold weight scalers : The administrators of Kent Company's pension plan decided to use the pension plan assets to purchase the company's stock to help defend the company against a hostile takeover by PWS Co.; the administrators were major shareholders of Kent Co.
Compare two strings to determine if they are the same : Write a statement (or statements) that will compare two strings to determine if they are the same, ignoring whether the characters are upper or lower case.
Use the convention that all years have 360 days : In writing the days() function, use the convention that all years have 360 days and each month consists of 30 days. The function should return the number of days for any Date structure passed to it. Write a main () function to test your function.
What was the new pressure inside the ball : a rigid ball contain 25.0 liters of air at 22 degree Celsius and 6.25atm pressure was placed in an oven at a temp of 100degree what was the new pressure inside the ball.
Correspondence and distance learning : What is the difference between correspondence and distance learning?
What is the purpose of anhydrous cacl2 : what is the purpose of anhydrous CaCl2? why is it important yhat none of the solid CaCl2 be included in the final distillation of 1- bromobutne.
State methyl orange was synthesized using a diazo-coupling : Methyl Orange was synthesized using a diazo-coupling reaction. Show how you would synthesize Yellow #3 and Red #32

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program which compute acceleration of jet fighter

Write a C++ program which compute the acceleration (m/s 2) of jet fighter launched from aircraft-carrier based catapult, provided jet's takeoff speed in km/hr

  Write a program to read only one integer number

Write a program to read ONLY one integer number (your input must be one 3 digit number from 100 to 999), and to think of a number as being ABC (where A, B, and C are the 3 digits of a number)

  Program that stores a series of numbers in a binary tree

Write a program that stores a series of numbers in a binary tree

  Write a complete c++ program

The main program will read in a parameter value n (read this in main). Then it will call a function read2arrays (details below) to read lists of grades into two arrays, which the main program will call test1 and test2 (or some other names of your ..

  For this program reads the first 11 characters

E main for this program reads the first 11 characters from input, saving them. It then reads 26 short integers into |vals|, and passes them and the characters to EmbedWatermark, which subtly alters the contents of vals to contain the characters. A..

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Object-oriented systems is the concept of object

At the heart of all object-oriented systems is the concept of an object. Simply stated, an object is a set of related characteristics and their associated actions.

  The mean and standard deviation

How do i write a program in c++ that use functions max, min, the total numbers, the mean and standard deviation to read a file text and return these values from the file text. note the file text has random numbers. note im not suppose to use arrays.

  This program will simulate the game of hearts

This program will simulate the game of Hearts, which is a four-player trick-taking game using any ordinary deck of playing cards. Each player is dealt thirteen cards. Whoever is dealt the Two of Clubs must lead it to the first trick. Each person p..

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Function declare that it can throw an ioexception

Every C++ function that performs file I/O will thus need to either declare that it can throw an IOException, or contain a try-catch-finally block to deal with it. Response?

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