home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CPTUTOR2.ZIP
/
CLOCK.CPP
< prev
next >
Wrap
Text File
|
1990-07-20
|
514b
|
32 lines
#include "clock.hpp"
#include "stdio.h"
clock::clock(void)
{
hour = 8;
minute = 51;
}
void
clock::inc_and_print_time(void)
{
minute++; // Add one minute to the time
if (minute > 59) {
minute -= 60;
hour++;
}
// Output the user prompt
printf("\n It is now %d:", hour);
if (minute < 10)
printf("0%dam", minute);
else
printf("%dam", minute);
printf(", what do you wish to do? ");
}