Welcome! Log In Create A New Profile


Assignment 1

Posted by schoema 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 1
April 24, 2006 01:10PM
Error in example of output for Assignment 1.
On page 10 of Tutorial letter 101 (COS112-V), the following possible output for the program you have to submit are given:

The example is as follows..

Input date 1 (mm dd yyyy):
02 20 2000
Input date 2 (mm dd yyyy):
04 13 2002
The difference is: 786 days.
Press any key to continue . . .

Please note that the difference is actually 783 days, and not 786 days. 2000 is a leap year and has 366 days, 2001 has 365. 2000-02-20 is the 51st day of the year (31+20) thus leaving 366-51=315 days, 2002-04-13 is the 103rd day of the year (31+28+31+13). Thus 315+365+103 = 783 and not 786 as published in the tutorial letter.

Our apologies for the error in the tutorial letter.

COS112-V lecturers
Sorry, only registered users may post in this forum.

Click here to login