програма, яка очікує певну кількість секунд:
#include <stdio.h>
#include <dos.h>
int main()
{
int del; // The delay period
printf("Enter the delay time (in seconds): ");
scanf("%i",&del);
del *= 1000; // Multiply it by 1000 to convert to milliseconds
Delay(del); // Delay.
printf("Done.");
return 0;
}
Програма, яка виконує зворотний відлік від 10 to 0:
#include <STDIO.H>
#include <TIME.H>
int main()
{
int i;
for(i = 10; i >= 0; i--)
{
printf("%i\n",i); // Write the current 'countdown' number
Delay(1000); // Wait a second
}
return 0;
}