program bcc; uses crt; var a, b, c, d, i, n: integer; begin clrscr; textcolor (lightblue+blink); writeln (‘WELCOME TO THE MULTIPLICATION TABLE PROGRAM’); textcolor (yellow); writeln (‘1.Start’); writeln (‘2.Huong Dan’); writeln (‘3.Exit’); write (‘Ban chon (1, 2, 3): ‘); readln (i); if i=1 then begin clrscr; writeln (‘nhap bang cuu chuong (1, 2, 3,…): ‘); readln (n); for i:=1 to 10 do begin textcolor (lightblue); writeln (n,’x’,i,’=’,n*i); delay (50); end; delay (2500); textcolor (green+blink); writeln (‘PRESS ENTER TO EXIT’); readln; exit; end; if i=2 then begin clrscr; writeln (‘ HUONG DAN’); writeln (‘ban hay chon start de bat dau. Va sau do se co dong chu’); writeln (‘”nhap bang cuu chuong (1, 2, 3,…):” va ban se nhap vao’); writeln (‘bang cuu chuong minh can tim. VD: Neu ban chon bang cuu’); writeln (‘chuong 2 th ban chi can nhap “2” vao cho nhu o tren day’); writeln (‘ CHUC BAN THANH CONG !!!’); readln; end; if i=3 then exit; if (i<1) or (i>3) then begin clrscr; textcolor (lightred+blink); writeln (‘yeu cau khong hop le’); writeln (‘PRESS ENTER TO EXIT’); readln; exit; end; end.
bảng dọc
program bangcuuchuong;
uses crt;
var i,j : integer;
begin
clrscr;
for i:=2 to 9 do
begin
writeln(‘bang cuu chuong’,i);
for j:=1 to 9 do writeln(i,’x’,j,’=’,j+i);
readln
end;
readln
end.
program bcc;
uses crt;
var a, b, c, d, i, n: integer;
begin
clrscr;
textcolor (lightblue+blink);
writeln (‘WELCOME TO THE MULTIPLICATION TABLE PROGRAM’);
textcolor (yellow);
writeln (‘1.Start’);
writeln (‘2.Huong Dan’);
writeln (‘3.Exit’);
write (‘Ban chon (1, 2, 3): ‘);
readln (i);
if i=1 then
begin
clrscr;
writeln (‘nhap bang cuu chuong (1, 2, 3,…): ‘);
readln (n);
for i:=1 to 10 do
begin
textcolor (lightblue);
writeln (n,’x’,i,’=’,n*i);
delay (50);
end;
delay (2500);
textcolor (green+blink);
writeln (‘PRESS ENTER TO EXIT’);
readln;
exit;
end;
if i=2 then
begin
clrscr;
writeln (‘ HUONG DAN’);
writeln (‘ban hay chon start de bat dau. Va sau do se co dong chu’);
writeln (‘”nhap bang cuu chuong (1, 2, 3,…):” va ban se nhap vao’);
writeln (‘bang cuu chuong minh can tim. VD: Neu ban chon bang cuu’);
writeln (‘chuong 2 th ban chi can nhap “2” vao cho nhu o tren day’);
writeln (‘ CHUC BAN THANH CONG !!!’);
readln;
end;
if i=3 then
exit;
if (i<1) or (i>3) then
begin
clrscr;
textcolor (lightred+blink);
writeln (‘yeu cau khong hop le’);
writeln (‘PRESS ENTER TO EXIT’);
readln;
exit;
end;
end.