1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
program fiche;
uses crt;
var
cl, nt : string;
sejour, pu, pt, rc, tax, np, contour : currency;
begin
clrscr;
write('le client est :');
readln(cl);
write('la nationalite est :');
readln(nt);
write('le sejour est :');
readln(sejour);
write('le prix unitaire :');
readln(pu);
// réduction HT
rc := (sejour/5) * 50;
// prix total HT et HR (hors reduction)
pt := sejour * pu;
// taxe
// tax := (7/100)*pt + (1/3*rc); // ??! logiquement Taxe = PTHT * Taux
tax := (pt-rc) * 0.07; // = 7% de taxe, reduction comprise! arnaqueur!
np := (pt-rc) + tax;
writeln('+------------------------------------------+');
writeln('| la fiche de reservation |');
writeln('+------------------------------------------+');
writeln(' client ......... : ', cl);
writeln(' nationalite .... : ', nt);
writeln(' sejour ......... : ', sejour:2:2);
writeln(' prix unitaire .. : ', pu:2:2);
writeln(' prix total ..... : ', pt:2:2);
writeln(' reduction ...... : ', rc:2:2);
writeln(' taxe ........... : ', tax:2:2);
writeln('+------------------------------------------+');
writeln(' net a payer .... : ', np:2:2, 'DH');
writeln('+------------------------------------------+');
readln;
end. |
Partager