Assignment 4 description

Assignment 4 description - Homework 4 Purpose: functions;...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 4 Purpose: functions; call by value; call by reference using addresses. 1. (10 points) Kelley and Pohl textbook page 165 #10. Call this program file hailstones.c. 2. (90 points) Write a program to compute the exact number of days between any two dates in history. Call this program file days.c. A sample run, with user input in boldface, would be: Enter first date: 10/5/1846 Enter second date: 6/2/2005 There are 57949 days between the two dates. Note that the year must be entered as four digits since it can be from any century. (For this assignment you can ignore the fact that different calendars have been used in different periods in history, and just extend the calendar we currently use forward and backward in time.) The program should check the input format for each date, including: presence of ‘/’ between numbers, month between 1 and 12, and date within the actual number of days for that month. If an input error occurs the program should print an appropriate message and re-input the date.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/19/2012 for the course GEOG 305 taught by Professor Prout during the Spring '08 term at Texas A&M.

Page1 / 2

Assignment 4 description - Homework 4 Purpose: functions;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online