0% found this document useful (0 votes)
5 views1 page

Fact Sac

The document is a Pascal program that calculates a utility bill based on the consumption index. It takes two inputs: the new index and the old index, computes the consumption, and applies a tiered pricing structure to determine the total bill amount. The final bill is displayed in Algerian Dinar (DA).

Uploaded by

amar zabot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Fact Sac

The document is a Pascal program that calculates a utility bill based on the consumption index. It takes two inputs: the new index and the old index, computes the consumption, and applies a tiered pricing structure to determine the total bill amount. The final bill is displayed in Algerian Dinar (DA).

Uploaded by

amar zabot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

program fact;

uses crt;
var C,S1,S2,S3,S,idxn,idxa:real;
begin
clrscr;
write ('entrer le nouveau index idxn=');
read(idxn);
write ('entrer ancien index idxa=');
read(idxa);

{la consommation est:}


C:=idxn-idxa;
WRITELN (C);

{ WRITE('ENTRER LA CONSOMMATION C=');


READ(C); }
if C<=125 then
begin
S:= (C* 1.7787)* 1.09;

end;
if ((C>125) and (C<=250)) then
begin
S1:= (125* 1.7787)* 1.09;
S:=S1+((C-125)* 4.1789)* 1.09;

end;
if (C>250) and (C<=1000) then
begin
S1:= (125* 1.7787)* 1.09;
S2:=S1+(125* 4.1789)* 1.09;
S:=S2+((C-250)* 4.8120)* 1.19;
end
else IF (C>1000) THEN
begin
S1:= (125* 1.7787)* 1.09;
S2:=S1+(125* 4.1789)* 1.09;
S3:=S2+(750* 4.8120)* 1.19;
S:=S3+((C-1000)* 5.4796)* 1.19;

end;
S:=S+(164.16+150+100);

write ('la valeur de votre facture est S=',S:0:2,' ','DA');


readln;
readln;
end.

You might also like