daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Jan 24th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top