Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* **************************** */
- /* Gervasi Jean 2101 */
- /* 29/09/2011 */
- /* ***************************** */
- #include<stdio.h>
- #include<stdlib.h>
- int main(void)
- {
- /*Variable */
- int iSec,iHeure,iMin,iSec2;
- /*Titre*/
- printf("Convertisseur secondes-heures\n");
- /* Saisie */
- printf("Entrer un nombre de secondes\n");
- scanf("%d", &iSec);
- /*Calcul */
- iHeure=iSec/3600;
- iSec2=iSec-(iSec/3600)*3600;
- printf("\n %d", iSec2);
- iMin=(iSec-iHeure*3600)/60;
- iSec2=iSec2-(iMin*60);
- /*Fin */
- printf("\n%d secondes = %d H %d Min %d Sec\n", iSec,iHeure,iMin,iSec2);
- return 0;
- }
Add Comment
Please, Sign In to add comment