Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if ss<= 300 then
begin
gotoxy(43,9); write(550:7);
if ss<=100 then begin gotoxy(31,9); write(ss:11);
gotoxy(51,9); write(ss*550:19);
end
else begin gotoxy(31,9); write(100:11);
gotoxy(51,9); write(100*550:19);
end;
if ss>=150 then begin gotoxy(31,10); write(50:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write(900*50:19);
end
else begin gotoxy(31,10); write(ss-100:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write((ss-100)*900:19);
end;
if ss>=200 then begin gotoxy(31,11); write(50:11); gotoxy(43,11); write(1210:7);
gotoxy(31,12); write(ss-200:11); gotoxy(43,12); write(1340:7);
gotoxy(51,11); write(50*1210:19);
gotoxy(51,12); write((ss-200)*1340:19);
end
else begin gotoxy(31,11); write(ss-150:11); gotoxy(43,11); write(1210:7);
gotoxy(51,11); write((ss-150)*1210:19);
end;
end;
if ss<= 300 then
begin
gotoxy(43,9); write(550:7);
if ss<=100 then begin gotoxy(31,9); write(ss:11);
gotoxy(51,9); write(ss*550:19);
end
else begin gotoxy(31,9); write(100:11);
gotoxy(51,9); write(100*550:19);
if ss>=150 then begin gotoxy(31,10); write(50:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write(900*50:19);
if ss>=200 then begin gotoxy(31,11); write(50:11); gotoxy(43,11); write(1210:7);
gotoxy(31,12); write(ss-200:11); gotoxy(43,12); write(1340:7);
gotoxy(51,11); write(50*1210:19);
gotoxy(51,12); write((ss-200)*1340:19);
end
else begin gotoxy(31,11); write(ss-150:11); gotoxy(43,11); write(1210:7);
gotoxy(51,11); write((ss-150)*1210:19);
end;
end
else begin gotoxy(31,10); write(ss-100:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write((ss-100)*900:19);
end;
end;
program __tuan;
uses crt;
var ss,sd,sc,tien,i,j:longint;
m,y:integer;
thgd,ch:char;
c3,t,c,d,h,tien1:longint;
begin
repeat
clrscr;
textcolor(15);
write('Nhap thang, nam:'); readln(m,y);
write('Nhap ten ho gia dinh:'); readln(thgd);
write('Nhap chi so cong to dau:'); readln(sd);
write('Nhap chi so cong to cuoi:'); readln(sc);
if (sd<sc) and (sc-sd<=130000) then
begin
clrscr;
ss:=sc-sd;
gotoxy(2,2);write('Hoa don tien dien':44);
gotoxy(2,3);write('Thang ',m:2,' nam ',y:5);
gotoxy(2,4);write('Ten ho gia dinh: ',thgd);
gotoxy(1,1);
for i:=1 to 70 do write('-');
gotoxy(1,20);
for i:=1 to 70 do write('-');
gotoxy(1,5);
for i:=1 to 70 do write('-');
gotoxy(1,7);
for i:=1 to 70 do write('-');
gotoxy(1,9);
for i:=1 to 22 do write('-');
gotoxy(23,14);
for i:=23 to 70 do write('-');
gotoxy(23,16);
for i:=23 to 70 do write('-');
gotoxy(23,18);
for i:=23 to 70 do write('-');
for i:=1 to 19 do
begin
gotoxy(1,i);write('!');
gotoxy(70,i);write('!');
if i>4 then
begin
{ if i<10 then gotoxy(12,i);write('!');}
gotoxy(23,i);write('!');
gotoxy(50,i);write('!');
if i<17 then
begin
gotoxy(30,i);write('!');
gotoxy(42,i);write('!');
end;
end;
end;
for i:=5 to 9 do begin gotoxy(12,i);write('!'); end;
gotoxy(2,6);write('Chi so dau');
gotoxy(13,6);write('Chi so sau');
gotoxy(24,6);write('He so');
gotoxy(31,6);write('DN tieu thu');
gotoxy(43,6);write('Don gia');
gotoxy(51,6);write('Thanh tien':15);
gotoxy(1,8);
write('!',sd:10,'!',sc:10,'!','1!':7,ss:11,'!');
gotoxy(24,9); write('Tr.do:');
if ss<=100 then tien:=ss*550;
if (ss>100) and (ss<=150) then tien:=100*550+(ss-100)*900;
if (ss>150) and (ss<=200) then tien:=100*550+50*900+(ss-150)*1210;
if (ss>200) and (ss<=300) then tien:=100*550+50*900+50*1210+(ss-200)*1340;
if (ss>300) and (ss<=400) then tien:=200*1100+100*1340+(ss-300)*1400;
if (ss>400) then tien:=200*1100+100*1340+100*1400+(ss-400)*1500;
if ss<= 300 then
begin
gotoxy(43,9); write(550:7);
if ss<=100 then begin gotoxy(31,9); write(ss:11);
gotoxy(51,9); write(ss*550:19);
end
else begin gotoxy(31,9); write(100:11);
gotoxy(51,9); write(100*550:19);
if ss>=150 then begin gotoxy(31,10); write(50:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write(900*50:19);
if ss>=200 then begin gotoxy(31,11); write(50:11); gotoxy(43,11); write(1210:7);
gotoxy(31,12); write(ss-200:11); gotoxy(43,12); write(1340:7);
gotoxy(51,11); write(50*1210:19);
gotoxy(51,12); write((ss-200)*1340:19);
end
else begin gotoxy(31,11); write(ss-150:11); gotoxy(43,11); write(1210:7);
gotoxy(51,11); write((ss-150)*1210:19);
end;
end
else begin gotoxy(31,10); write(ss-100:11); gotoxy(43,10); write(900:7);
gotoxy(51,10); write((ss-100)*900:19);
end;
end;
end;
if ss>300 then
begin
gotoxy(31,9); write(200:11);
gotoxy(51,9); write(200*1100:19);
gotoxy(43,9); write(1100:7);
gotoxy(31,10); write(100:11);
gotoxy(51,10); write(100*1340:19);
gotoxy(43,10); write(1340:7);
if ss>=400 then begin gotoxy(31,11); write(100:11); gotoxy(43,11); write(1400:7);
gotoxy(31,12); write(ss-400:11); gotoxy(43,12); write(1500:7);
gotoxy(51,11); write(100*1400:19);
gotoxy(51,12); write((ss-300)*1400:19);
end
else begin gotoxy(31,11); write(ss-300:11); gotoxy(43,11); write(1400:7);
gotoxy(51,11); write((ss-300)*1400:19);
end;
end;
gotoxy(25,15); write('Cong !',288:11,'!','!':8,tien:19);
gotoxy(24,17); write('Thue GTGT (10%):');gotoxy(51,17); write(round(tien/10):19);
gotoxy(24,19); write('Tong cong tien thanh toan:');gotoxy(51,19); write(round(tien*11/10):19);
gotoxy(2,21);
write('So tien viet bang chu');
gotoxy(1,23);
for i:=1 to 70 do write('-');
for i:=20 to 23 do
begin
gotoxy(1,i); write('!');
gotoxy(70,i); write('!');
end;
tien:=(tien*11) div 10;
gotoxy(2,22);
tien1:=tien;
h:=1000000000;
textcolor(10);
repeat
c3:=tien1 div (h div 1000);
if c3<>0 then
begin
t:=c3 div 100;
c3:=c3 mod 100;
c:=c3 div 10;
d:=c3 mod 10;
case t of
0:if (tien1<>tien) and ((c<>0) or (d<>0)) then write('khong tram ');
1:write('mot tram ');
2:write('hai tram ');
3:write('ba tram ');
4:write('bon tram ');
5:write('nam tram ');
6:write('sau tram ');
7:write('bay tram ');
8:write('tam tram ');
9:write('chin tram ');
end;
case c of
0: if (d<>0) and (tien1<>tien) and (c<>0) then write('linh ');
1:write('muoi ');
2:write('hai muoi ');
3:write('ba muoi ');
4:write('bon muoi ');
5:write('nam muoi ');
6:write('sau muoi ');
7:write('bay muoi ');
8:write('tam muoi ');
9:write('chin muoi ');
end;
case d of
1:write('mot ');
2:write('hai ');
3:write('ba ');
4:write('bon ');
5:if c<>0 then write('lam ')
else write('nam ');
6:write('sau ');
7:write('bay ');
8:write('tam ');
9:write('chin ');
end;
if h=1000000000 then write('trieu ');
if h=1000000 then write('nghin ');
if h=1000 then write('dong ');
end;
h:=h div 1000;
if h<>0 then
tien1:=tien1 mod h;
until h=1;
end
else writeln('Nhap du lieu sai');
writeln;
gotoxy(1,25);
textcolor(15);
write('Co tinh tiep khong? (C/K) ');readln(ch);
until (ch='k') or (ch='K');
end.