|
|
|
© 1998 by Bobby Griggs.
// This is the first program for Computer Programming.
// The program displays "Hello World" on the monitor. After 5
// seconds, the program terminates execution.
// Win32 console application
#include < iostream.h >
#include < time.h >
void Delay(long);
int main()
{
time_t Initialtime = time(NULL), delta=0;
cout << "Hello World!" << endl;
cout << "Man, this is a chingy program!" << endl;
Delay(5);
return 0;
}
void Delay (long delay)
{
long initialtime = time(NULL), delta = 0;
while (delta < delay)
{
delta = time(NULL) - initialtime;
}
return;
}
|