Chắc suất Đại học top - Giữ chỗ ngay!! ĐĂNG BÀI NGAY để cùng trao đổi với các thành viên siêu nhiệt tình & dễ thương trên diễn đàn.
uses crt;
var i,a,b,c1,c2,c3,dem,cuoc,e:byte;
d:string;
ten:string [10];
tk,l:integer;
begin
clrscr;
gotoxy(35,10);
textcolor(green);
writeln('GAME');
textcolor(yellow);
gotoxy(35,11);
writeln('BAU');
textcolor(lightred);
gotoxy(35,12);
writeln('CUA');
delay(1500);
textcolor(white);
clrscr;
write('Ten ban la: ');readln(ten);
clrscr;
gotoxy(23,11);
textcolor(lightred);
writeln('!!Chao mung den voi game bau cua!!');
textcolor(white);
delay(3000);
clrscr;
for e:=1 to 100 do
begin
gotoxy(33,11);
write('Loading ',e,'%');
delay(70);
clrscr;
end;
cuoc:=5;
tk:=60;
repeat
dem:=0;
clrscr;
writeln('GAME BAU CUA');
writeln;
writeln('------------------------');
writeln('| nai(0)| bau(1)| ga(2)|');
writeln('------------------------');
writeln('| ca(3) | cua(4)|tom(5)|');
writeln('------------------------');
writeln;
writeln;
writeln('Tai khoan ',ten,' dang co la ',tk,' xu');
writeln('Ban cuoc ',cuoc,' xu');
textcolor(yellow);
write(ten,' hay chon tu 0->5:');readln(a);
while (a<0) or (a>5) do
begin
gotoxy(1,wherey-1);clreol;
write(ten,' hay chon lai tu 0->5:');readln(a);
end;
textcolor(white);
begin
if a=0 then d:='nai';
if a=1 then d:='bau';
if a=2 then d:='ga';
if a=3 then d:='ca';
if a=4 then d:='cua';
if a=5 then d:='tom';
end;
textcolor(lightgreen);
write('Chon so lan dat cuoc tu 1->6:');readln(b);
while (b<1) or (b>6) do
begin
gotoxy(1,wherey-1);clreol;
write('Chon lai so lan dat cuoc tu 1->6:');readln(b);
end;
textcolor(white);
clrscr;
for l:=3 downto 1 do
begin
gotoxy(27,11);
textcolor(lightcyan);
writeln('Dang lac trong ',l,' giay');
textcolor(white);
delay(1000);
clrscr;
end;
textcolor(cyan);
if a=0 then writeln(ten,' da chon nai');
if a=1 then writeln(ten,' da chon bau');
if a=2 then writeln(ten,' da chon ga');
if a=3 then writeln(ten,' da chon ca');
if a=4 then writeln(ten,' da chon cua');
if a=5 then writeln(ten,' da chon tom');
textcolor(white);
{1}
begin
randomize;
c1:=random(6);
writeln('Ket qua la:');
begin
textcolor(yellow);
writeln('------------------');
if c1=0 then write('nai | ');
if c1=1 then write('bau | ');
if c1=2 then write('ga | ');
if c1=3 then write('ca | ');
if c1=4 then write('cua | ');
if c1=5 then write('tom | ');
textcolor(white);
end;
begin
if a=c1 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
{2}
begin
c2:=random(6);
begin
textcolor(yellow);
if c2=0 then write('nai | ');
if c2=1 then write('bau | ');
if c2=2 then write('ga | ');
if c2=3 then write('ca | ');
if c2=4 then write('cua | ');
if c2=5 then write('tom | ');
textcolor(white);
end;
begin
if a=c2 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
{3}
begin
c3:=random(6);
begin
textcolor(yellow);
if c3=0 then writeln('nai | ');
if c3=1 then writeln('bau | ');
if c3=2 then writeln('ga | ');
if c3=3 then writeln('ca | ');
if c3=4 then writeln('cua | ');
if c3=5 then writeln('tom | ');
writeln('------------------');
textcolor(white);
end;
begin
if a=c3 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
textcolor(green);
if (a=c1) or (a=c2) or (a=c3) then writeln(ten,' da chon dung ',dem,' con ',d) else writeln(ten,' khong chon khong dung con nao');
textcolor(white);
if (a<>c1) and (a<>c2) and (a<>c3) then tk:=tk-cuoc*b;
delay(5000);
begin
if (tk>0) and (tk<=5) then cuoc:=1;
if (tk>=6) and (tk<=100) then cuoc:=5;
if (tk>=101) and (tk<=200) then cuoc:=10;
if (tk>=201) and (tk<=300) then cuoc:=20;
if (tk>=301) and (tk<=400) then cuoc:=40;
if (tk>=401) and (tk<=500) then cuoc:=60;
if (tk>=501) and (tk<=600) then cuoc:=70;
if tk>600 then cuoc:=80;
end;
if tk<=0 then
begin
writeln('Ban da het xu de choi');
delay(1500);
end;
until tk<=0;
halt;
readln
end.
var i,a,b,c1,c2,c3,dem,cuoc,e:byte;
d:string;
ten:string [10];
tk,l:integer;
begin
clrscr;
gotoxy(35,10);
textcolor(green);
writeln('GAME');
textcolor(yellow);
gotoxy(35,11);
writeln('BAU');
textcolor(lightred);
gotoxy(35,12);
writeln('CUA');
delay(1500);
textcolor(white);
clrscr;
write('Ten ban la: ');readln(ten);
clrscr;
gotoxy(23,11);
textcolor(lightred);
writeln('!!Chao mung den voi game bau cua!!');
textcolor(white);
delay(3000);
clrscr;
for e:=1 to 100 do
begin
gotoxy(33,11);
write('Loading ',e,'%');
delay(70);
clrscr;
end;
cuoc:=5;
tk:=60;
repeat
dem:=0;
clrscr;
writeln('GAME BAU CUA');
writeln;
writeln('------------------------');
writeln('| nai(0)| bau(1)| ga(2)|');
writeln('------------------------');
writeln('| ca(3) | cua(4)|tom(5)|');
writeln('------------------------');
writeln;
writeln;
writeln('Tai khoan ',ten,' dang co la ',tk,' xu');
writeln('Ban cuoc ',cuoc,' xu');
textcolor(yellow);
write(ten,' hay chon tu 0->5:');readln(a);
while (a<0) or (a>5) do
begin
gotoxy(1,wherey-1);clreol;
write(ten,' hay chon lai tu 0->5:');readln(a);
end;
textcolor(white);
begin
if a=0 then d:='nai';
if a=1 then d:='bau';
if a=2 then d:='ga';
if a=3 then d:='ca';
if a=4 then d:='cua';
if a=5 then d:='tom';
end;
textcolor(lightgreen);
write('Chon so lan dat cuoc tu 1->6:');readln(b);
while (b<1) or (b>6) do
begin
gotoxy(1,wherey-1);clreol;
write('Chon lai so lan dat cuoc tu 1->6:');readln(b);
end;
textcolor(white);
clrscr;
for l:=3 downto 1 do
begin
gotoxy(27,11);
textcolor(lightcyan);
writeln('Dang lac trong ',l,' giay');
textcolor(white);
delay(1000);
clrscr;
end;
textcolor(cyan);
if a=0 then writeln(ten,' da chon nai');
if a=1 then writeln(ten,' da chon bau');
if a=2 then writeln(ten,' da chon ga');
if a=3 then writeln(ten,' da chon ca');
if a=4 then writeln(ten,' da chon cua');
if a=5 then writeln(ten,' da chon tom');
textcolor(white);
{1}
begin
randomize;
c1:=random(6);
writeln('Ket qua la:');
begin
textcolor(yellow);
writeln('------------------');
if c1=0 then write('nai | ');
if c1=1 then write('bau | ');
if c1=2 then write('ga | ');
if c1=3 then write('ca | ');
if c1=4 then write('cua | ');
if c1=5 then write('tom | ');
textcolor(white);
end;
begin
if a=c1 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
{2}
begin
c2:=random(6);
begin
textcolor(yellow);
if c2=0 then write('nai | ');
if c2=1 then write('bau | ');
if c2=2 then write('ga | ');
if c2=3 then write('ca | ');
if c2=4 then write('cua | ');
if c2=5 then write('tom | ');
textcolor(white);
end;
begin
if a=c2 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
{3}
begin
c3:=random(6);
begin
textcolor(yellow);
if c3=0 then writeln('nai | ');
if c3=1 then writeln('bau | ');
if c3=2 then writeln('ga | ');
if c3=3 then writeln('ca | ');
if c3=4 then writeln('cua | ');
if c3=5 then writeln('tom | ');
writeln('------------------');
textcolor(white);
end;
begin
if a=c3 then
begin
tk:=tk+cuoc*b;
dem:=dem+1;
end;
end;
end;
textcolor(green);
if (a=c1) or (a=c2) or (a=c3) then writeln(ten,' da chon dung ',dem,' con ',d) else writeln(ten,' khong chon khong dung con nao');
textcolor(white);
if (a<>c1) and (a<>c2) and (a<>c3) then tk:=tk-cuoc*b;
delay(5000);
begin
if (tk>0) and (tk<=5) then cuoc:=1;
if (tk>=6) and (tk<=100) then cuoc:=5;
if (tk>=101) and (tk<=200) then cuoc:=10;
if (tk>=201) and (tk<=300) then cuoc:=20;
if (tk>=301) and (tk<=400) then cuoc:=40;
if (tk>=401) and (tk<=500) then cuoc:=60;
if (tk>=501) and (tk<=600) then cuoc:=70;
if tk>600 then cuoc:=80;
end;
if tk<=0 then
begin
writeln('Ban da het xu de choi');
delay(1500);
end;
until tk<=0;
halt;
readln
end.