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 a program using one while loop

Write a program using one while loop that will read in a sequence of integers guaranteed to be within the inclusive range of 0 through 99,999 from the user

  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.

  Stores a series of numbers in a binary tree.

Queue Converter, Write a program that stores a series of numbers in a binary tree. Then have the program insert the values into a queue in ascending order. Dequeue the values and display them on the screen to confirm that they were stored in the prop..

  Implement a graphics system that has classes

Implement a graphics System that has classes for various figures: rectangles, squares, triangles and circles. A rectangle has data members height, width, color , and center point. A square has center point and an edge and color

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Throws an exception from a deeply nested

Write a program that throws an exception from a deeply nested function and still has the catch handler following the try block enclosing the initial call in main catch the exception

  A company that market is publishing both book and audio cass

A company that market is publishing both book and audiocassette versions

  We wish to process survey results

Suppose we wish to process survey results that are stored in a file. This exercise requires twoseparate programs. First, create a program that prompts the user for survey responses and outputseach response to a file

  Program to compute diameter in centimeters of a steel rod

Write a program to compute the diameter in centimeters of a steel rod, an aluminum rod, and a copper rod, which can withstand a particular compression load.

  Ng stands for next guess

Where NG stands for next guess and LG stands for last guess. Write a function that calculates the square root of a number using this method. The initial guess will be the starting value of LG .

  Write a program using vectors and iterators

Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulating it mathematically, eventually outputs your entire phone number. The d..

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