Guest User

Untitled

a guest
Jan 24th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. /* **************************** */
  2. /*    Gervasi Jean 2101          */
  3. /*    29/09/2011                */
  4. /* ***************************** */
  5.  
  6. #include<stdio.h>
  7. #include<stdlib.h>
  8.  
  9. int main(void)
  10. {
  11.     /*Variable */
  12.     int iSec,iHeure,iMin,iSec2;
  13.  
  14.     /*Titre*/
  15.     printf("Convertisseur secondes-heures\n");
  16.  
  17.     /* Saisie */
  18.     printf("Entrer un nombre de secondes\n");
  19.     scanf("%d", &iSec);
  20.  
  21.     /*Calcul */
  22.     iHeure=iSec/3600;
  23.     iSec2=iSec-(iSec/3600)*3600;
  24.     printf("\n %d", iSec2);
  25.     iMin=(iSec-iHeure*3600)/60;
  26.     iSec2=iSec2-(iMin*60);
  27.  
  28.  
  29.     /*Fin */
  30.     printf("\n%d secondes = %d H %d Min %d Sec\n", iSec,iHeure,iMin,iSec2);
  31.  
  32.     return 0;
  33.  
  34. }
Add Comment
Please, Sign In to add comment