You are encouraged to work with a partner.
I will show you on Wednesday, 27 Oct, how to make a 'tarball' of a directory. Work in a subdirectory called initslab8, where inits are your initials. Once you have completed the C programs and made script files to demonstrate your testing of each, remove any extraneous files so that your directory contains just the 3 .c files and the 3 script files. Then make a tarball of that directory and send it to me as an attachment to the email whose subject line should be CS33 Lab8. Send the email to cfk@cs.swarthmore.edu.
Each program must follow these following guidelines:
Some examples of times in 24-hour format are:
The following are some sample runs of this program. Underlined words are entries that the user typed in:
Run 1:
Enter the first time: 10:46
Enter the second time: 13:51
The difference between the times is 3 hours and 5 minutes.
Run 2 - Make sure you say "1 hour" (or "1 minute") not "1 hours" (or "1 minutes"):
Enter the first time: 13:15
Enter the second time: 14:30
The difference between the times is 1 hour and 15 minutes.
Run 3 - If the hours are 0, don't print them:
Enter the first time: 17:59
Enter the second time: 18:00
The difference between the times is 1 minute.
Run 4 - If the minutes are 0, don't print them. Note that the second time isn't always later in the day than the first time:
Enter the first time: 03:22
Enter the second time: 07:22
The difference between the times is 4 hours.
Run 5 - If there is no difference, say so:
Enter the first time: 09:29
Enter the second time: 09:29
There is no difference between the times.
Your program (called perfect.c) should calculate and print out the first 4 perfect numbers (one per line); the fifth perfect number is quite large (33550336), so you should be sure you stop after four!
Note: As of 8 October, the final exam for CS33 has been scheduled by the registrar for Friday 12/17/2010, 9:00am-12:00pm in SC240. Plan to attend.