All pastes #813387 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-12 14:22 UTC
rendered paste body
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
int main( void )
{
   int temps, inter;
      
   printf("Entrez le nombre de minutes:\n");
   scanf("%d", &temps);
   getchar();
      
   temps = temps*60;
   inter = temps;
   time_t heure_depart;
   heure_depart = time(NULL);
   time_t actuel;
   actuel = time (NULL);
   
   while(difftime( actuel, heure_depart) < temps)
       {
         Sleep(1000);
         clrscr();
         actuel = time(NULL);
         inter-=1;
         printf("%d secondes restantes!\n", inter);
       }
       
   
       printf("Fini");
       int a;
       for (a=0; a<10; a++)
         {
            Beep(200,250);
         }
       getchar();    
       return 0;
}