Program Exercice04; Uses crt; Var n, i, max, min, nombre : Integer; Begin { Cette boucle force la lecture d'un nombre positif } Repeat WriteLn('Donnez un nombre strictement positif'); ReadLn(n); Until(n > 0); WriteLn('Veuillez introduire ', n, ' nombres :'); ReadLn(nombre); max := nombre; min := nombre; { On commence la boucle par 2 parce qu'on a déjà lu un nombre } For i := 2 to n Do Begin ReadLn(nombre); { Attention : deux conditions indépendantes, alors pas de "Else" } If(nombre > max)Then max := nombre; If(nombre < min)Then min := nombre; End; WriteLn('min = ', min); WriteLn('max = ', max); End.