S
sreelal
Dear All,
main()
{
int num;
printf("Enter a number ");
scanf("%d",&num);
}
In the above C program,
I would like the user to allow only 20 seconds to enter any number.
Just after 20 seconds, the program must terminate even if the user
has not entered any number. How can I set such a timer in the above
program. Also the decrementing time should be displayed on the screen,
along with other output,
Please suggest me a code in C to fullfill the above requirement.
Margee S
main()
{
int num;
printf("Enter a number ");
scanf("%d",&num);
}
In the above C program,
I would like the user to allow only 20 seconds to enter any number.
Just after 20 seconds, the program must terminate even if the user
has not entered any number. How can I set such a timer in the above
program. Also the decrementing time should be displayed on the screen,
along with other output,
Please suggest me a code in C to fullfill the above requirement.
Margee S