the execute file of this programme works .. the programme works well ...
the only problem i have is that after 1st minute ... for all the next minutes the first 10 seconds appear me as 19 , 29 , 39 , 49, 59, 69 , 79, 89, 99 ,109, 11 ,12 ,13, ,.......
and after those 10 secs it works fine .....
can some one help me ?
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(){
//Variabili di OUTPUT
int sec,min,h;
//Inizio Algoritmo
sec=0;
min=0;
h=0;
do{
_sleep(1000);
sec=sec+1;
if(sec==60){
sec=0;
min=min+1;
if(min==60){
h=h+1;
min=0;
sec=0;
}
}
printf("\r%d : %d : %d",h,min,sec);
}while(h<=24);
}