- 12 Tháng tám 2020
- 4
- 3
- 6
- 17
- Quảng Nam
- trường THCS QUANG TRUNG
![](https://blog.hocmai.vn/wp-content/uploads/2017/07/hot.gif)
![](https://blog.hocmai.vn/wp-content/uploads/2017/07/hot.gif)
program Keo_Bua_Bao;
uses crt;
var c1, l, mc, nc, man, tg: integer;
var t1, mr, nr: string;
begin
clrscr;
gotoxy (33,3);
textcolor (white+blink);
writeln (' ********');
gotoxy (34,4);
writeln (' **********');
gotoxy (35,5);
writeln ('*** PLNB ***');
gotoxy (36,6);
writeln (' **********');
gotoxy (37,7);
writeln (' ********');
delay (1000);
clrscr;
gotoxy (39,9);
textcolor (lightblue+blink);
delay (1500);
l:=0;
begin
repeat
textcolor (white);
l:=l+1;
gotoxy (35,13);
writeln ('LOADING ',l,' %');
delay (50);
clrscr;
if l=100 then
delay (1000);
until l=100;
end;
begin
t1:='||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||';
for l:=1 to length(t1) do
begin
gotoxy (10,30);
write (t1[l]);
delay(30);
end;
end;
begin
clrscr;
textcolor (lightgreen+blink);
repeat
writeln ('CHAO MUNG DEN VOI TRO CHOI KEO BUA BAO');
textcolor (white);
writeln ('1.Start');
writeln ('2.Huong dan');
writeln ('3.Exit');
write ('Ban chon: ');
readln (c1);
if c1=1 then
begin
clrscr;
{ man:=1;
begin
writeln ('man ',man); }
{ if man=1 then }
repeat
clrscr;
begin
randomize;
mc:=random (3);
if mc=0 then
mr:='keo';
if mc=1 then
mr:='bua';
if mc=2 then
mr:='bao';
end;
begin
write ('ban muon su dung (1.keo) (2.bua) (3.bao): ');
readln (nc);
if nc=1 then
nr:='keo';
if nc=2 then
nr:='bua';
if nc=3 then
nr:='bao';
end;
writeln ('may ra ',mr);
writeln ('ban ra ',nr);
if (mr='keo') and (nr='keo') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (mr='bua') and (nr='bua') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (mr='bao') and (nr='bao') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
{ if (nr='keo') and (mr='keo') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (nr='bua') and (mr='bua') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (nr='bao') and (mr='bao') then
begin
writeln ('HOA NHAU');
tg:=1;
end; }
if (mr='keo') and (nr='bua') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (mr='bua') and (nr='bao') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (mr='bao') and (nr='keo') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (nr='keo') and (mr='bua') then
begin
writeln ('BAN THUA');
tg:=2;
end;
if (nr='bua') and (mr='bao') then
begin
writeln ('BAN THUA');
tg:=2;
end;
if (nr='bao') and (mr='keo') then
begin
writeln ('BAN THUA');
tg:=2;
end;
until tg=2;
end;
if c1=2 then
begin
clrscr;
textcolor (lightgreen+blink);
delay (50);
writeln (' CHAO MUNG BAN DEN VOI TRO CHOI KEO BUA BAO');
delay (50);
textcolor (white);
writeln ('Ban phai chon 1 trong 3 so tuong ung voi vat dung ma ban muon su dung (1=keo)');
delay (50);
writeln ('(2=bao) (3=bua) neu ban thang may thi ban se qua man. Tro choi gom co 10 man');
delay (50);
writeln ('neu ban qua man thi se duoc thang cap va tang them nhieu mon qua ngau nhien day');
delay (50);
writeln ('hap dan. CHUC BAN MAY MAN !!!');
textcolor (100);
writeln ('TAC GIA: PHAM LE NAM BINH (PLNB)');
readln;
exit;
end;
if c1=3 then
exit;
if (c1<>1) and (c1<>2) and (c1<>3) then
begin
clrscr;
writeln ('chon ko phu hop');
readln;
clrscr;
end;
until (tg=2) or (c1=3);
end;
readln;
end.
uses crt;
var c1, l, mc, nc, man, tg: integer;
var t1, mr, nr: string;
begin
clrscr;
gotoxy (33,3);
textcolor (white+blink);
writeln (' ********');
gotoxy (34,4);
writeln (' **********');
gotoxy (35,5);
writeln ('*** PLNB ***');
gotoxy (36,6);
writeln (' **********');
gotoxy (37,7);
writeln (' ********');
delay (1000);
clrscr;
gotoxy (39,9);
textcolor (lightblue+blink);
delay (1500);
l:=0;
begin
repeat
textcolor (white);
l:=l+1;
gotoxy (35,13);
writeln ('LOADING ',l,' %');
delay (50);
clrscr;
if l=100 then
delay (1000);
until l=100;
end;
begin
t1:='||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||';
for l:=1 to length(t1) do
begin
gotoxy (10,30);
write (t1[l]);
delay(30);
end;
end;
begin
clrscr;
textcolor (lightgreen+blink);
repeat
writeln ('CHAO MUNG DEN VOI TRO CHOI KEO BUA BAO');
textcolor (white);
writeln ('1.Start');
writeln ('2.Huong dan');
writeln ('3.Exit');
write ('Ban chon: ');
readln (c1);
if c1=1 then
begin
clrscr;
{ man:=1;
begin
writeln ('man ',man); }
{ if man=1 then }
repeat
clrscr;
begin
randomize;
mc:=random (3);
if mc=0 then
mr:='keo';
if mc=1 then
mr:='bua';
if mc=2 then
mr:='bao';
end;
begin
write ('ban muon su dung (1.keo) (2.bua) (3.bao): ');
readln (nc);
if nc=1 then
nr:='keo';
if nc=2 then
nr:='bua';
if nc=3 then
nr:='bao';
end;
writeln ('may ra ',mr);
writeln ('ban ra ',nr);
if (mr='keo') and (nr='keo') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (mr='bua') and (nr='bua') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (mr='bao') and (nr='bao') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
{ if (nr='keo') and (mr='keo') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (nr='bua') and (mr='bua') then
begin
writeln ('HOA NHAU');
tg:=1;
end;
if (nr='bao') and (mr='bao') then
begin
writeln ('HOA NHAU');
tg:=1;
end; }
if (mr='keo') and (nr='bua') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (mr='bua') and (nr='bao') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (mr='bao') and (nr='keo') then
begin
writeln ('BAN THANG');
tg:=2;
end;
if (nr='keo') and (mr='bua') then
begin
writeln ('BAN THUA');
tg:=2;
end;
if (nr='bua') and (mr='bao') then
begin
writeln ('BAN THUA');
tg:=2;
end;
if (nr='bao') and (mr='keo') then
begin
writeln ('BAN THUA');
tg:=2;
end;
until tg=2;
end;
if c1=2 then
begin
clrscr;
textcolor (lightgreen+blink);
delay (50);
writeln (' CHAO MUNG BAN DEN VOI TRO CHOI KEO BUA BAO');
delay (50);
textcolor (white);
writeln ('Ban phai chon 1 trong 3 so tuong ung voi vat dung ma ban muon su dung (1=keo)');
delay (50);
writeln ('(2=bao) (3=bua) neu ban thang may thi ban se qua man. Tro choi gom co 10 man');
delay (50);
writeln ('neu ban qua man thi se duoc thang cap va tang them nhieu mon qua ngau nhien day');
delay (50);
writeln ('hap dan. CHUC BAN MAY MAN !!!');
textcolor (100);
writeln ('TAC GIA: PHAM LE NAM BINH (PLNB)');
readln;
exit;
end;
if c1=3 then
exit;
if (c1<>1) and (c1<>2) and (c1<>3) then
begin
clrscr;
writeln ('chon ko phu hop');
readln;
clrscr;
end;
until (tg=2) or (c1=3);
end;
readln;
end.