{ Type agrege de stockage des informations } { relatives a un temps code sous la forme } { heure, minute, seconde } structure temps entier h <- 0 entier mn <- 0 entiers <- 0 fin structure { Programme principal } action principale() temps t1 temps t2 booleen inferieurEgalT1T2 entier difference entier s1 entier s2 afficherln("SVP, t1 (h, mn & s)?") t1.h <- saisir() t1.mn <- saisir() t1.s <- saisir() afficherln("SVP, t2 (h, mn & s)?") t2.h <- saisir() t2.mn <- saisir() t2.s <- saisir() s1 <- 3600*t1.h+60*t1.mn+t1.s s2 <- 3600*t2.h+60*t2.mn+t2.s inferieurEgalT1T2 <- (s1 <= s2) si inferieurEgalT1T2 == vrai alors difference <- s2-s1 afficherln("[",t2.h,":",t2.mn,":",t2.s,"]") afficherln("[",t1.h,":",t1.mn,":",t1.s,"]") sinon difference <- s1-s2 afficherln("[",t1.h,":",t1.mn,":",t1.s,"]") afficherln("[",t2.h,":",t2.mn,":",t2.s,"]") fsi afficherln("Ecart : ",difference," secondes") fin action