Timer using c programming language
/* hello guys my name is Manjunath.
This below program is a timer prototype using c programming language*/
#include<stdio.h>
#include<unistd.h>
int main()
{
int countdown;
printf(" Enter duration: ");
scanf("%d",&countdown);
printf("\nstarts now:\n");
while(countdown>0)
{
sleep(1);{
printf("\t\t%d\n",countdown);
}
countdown--;
}
printf("Time's up");
return 0;
}
Comments
Post a Comment