Citation :
PROGRAM salledesport;
uses crt;
VAR
datte : char;
clb : char;
vil : integer;
nbnorm : integer;
nbsup : integer;
nbdouch : integer;
mnorm : real;
msup : integer;
mdouch : integer;
txred : real;
total : real;
reduc : real;
tva : real;
pct : real;
autre : integer;
BEGIN
REPEAT
clrscr;
writeln ('Bienvenue sur le programme SalleDeSport de Yann' ;
BEGIN
clrscr;
writeln ('Entrez la date de facturation (JJ/MM/AA): ' ;
readln (datte);
writeln ('Entrez le nom du club: ' ;
readln (clb);
REPEAT
BEGIN
writeln ('Est ce un club de la ville (Oui: 1 Non: 2) ? ' ;
readln (vil);
END
UNTIL (vil=1) OR (vil=2);
writeln ('Entrez le nombre d''heures normales: ' ;
readln (nbnorm);
writeln ('Entrez le nombre d''heures suppl?mentaires: ' ;
readln (nbsup);
writeln ('Entrez le nombre de s?ance ou les douches ont ?taient utilis?es' ;
readln (nbdouch);
CASE vil OF
1:BEGIN
mdouch := 0;
REPEAT
BEGIN
write ('Entrez le pourcentage de jeunes licenc?s: ' ;
readln (pct);
IF pct > 50 THEN
BEGIN
mnorm := 2;
msup := 2;
txred := 0.2;
END
ELSE
BEGIN
mnorm := 3;
msup := 3;
txred := 0.1;
END;
END
UNTIL (pct > 0) AND (pct <= 100);
END;
2:BEGIN
mnorm := 3.5;
msup := 6;
txred :=0;
mdouch := 1;
END;
ELSE
write ('Erreur de saisie' ;
END;
writeln ('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿' ;
writeln ('³ Facture au ',datte :8,' ³' ;
writeln ('³ Club : ',clb,' ³' ;
writeln ('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´' ;
writeln ('³:: Libell? ³ Quantit? ³ Prix unitaire ³ Montant ³' ;
writeln ('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´' ;
writeln ('³ Heures normales ³',nbnorm,'³',mnorm,'³',nbnorm*mnorm,'³' ;
writeln ('³ Heures suppl?mentaires ³',nbsup,'³',msup,'³',nbsup*msup,'³' ;
writeln ('³ S?ances avec douches ³',nbdouch,'³',mdouch,'³',nbdouch*mdouch,'³' ;
writeln ('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄ´' ;
total := (nbnorm*mnorm)+(nbsup*msup)+(nbdouch*mdouch);
reduc := total*txred;
tva := (total-reduc)*0.206;
writeln (' ³ TOTAL ³',total,'³' ;
writeln (' ³ R?duction ³',reduc,'³' ;
writeln (' ³ TVA 20,6 % ³',tva,'³' ;
writeln (' ³ Net ? payer ³',total-reduc+tva,'³' ;
writeln (' ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÙ' ;
writeln ('Autre club? (Oui : 1 Non : 0) ?' ;
readln (autre)
END
UNTIL (autre = 0);
END.
|