viết chương trình đăng nhập để thoát khỏi chương trình
0 bình luận về “viết chương trình đăng nhập để thoát khỏi chương trình”
program password; uses crt; var tk, mk: string; begin repeat clrscr; textcolor (white); writeln (‘Dang nhap de thoat khoi chuong trinh’); write (‘nhap ten tai khoan: ‘); readln (tk); write (‘nhap mat khau: ‘); readln (mk); if (tk=’taikhoan_123′) and (mk=’123456789′) then exit; if (tk<>’taikhoan_123′) or (mk<>’123456789′) then
begin
clrscr; writeln (‘ten tai khoan hoac mat khau bi sai. vui long dang nhap lai’); readln;
end; until (tk=’taikhoan_123′) and (mk=’123456789′); readln; end.
uses crt; var tk, mk: string; begin repeat clrscr; textcolor (white); writeln (‘Dang nhap de thoat khoi chuong trinh’); write (‘nhap ten tai khoan: ‘); readln (tk); write (‘nhap mat khau: ‘); readln (mk); if (tk=’vnqt343′) and (mk=’123456789′) then exit; if (tk<>’vnqt343′) or (mk<>’123456789′) then textcolor (lightred); writeln (‘ten tai khoan hoac mat khau bi sai. vui long dang nhap lai’); readln; until (tk=’vnqt343′) and (mk=’123456789′); readln; end.
program password;
uses crt;
var tk, mk: string;
begin
repeat
clrscr;
textcolor (white);
writeln (‘Dang nhap de thoat khoi chuong trinh’);
write (‘nhap ten tai khoan: ‘); readln (tk);
write (‘nhap mat khau: ‘); readln (mk);
if (tk=’taikhoan_123′) and (mk=’123456789′) then exit;
if (tk<>’taikhoan_123′) or (mk<>’123456789′) then
begin
clrscr;
writeln (‘ten tai khoan hoac mat khau bi sai. vui long dang nhap lai’);
readln;
end;
until (tk=’taikhoan_123′) and (mk=’123456789′);
readln;
end.
tên tài khoản: taikhoan_123
mật khẩu: 123456789
uses crt;
var tk, mk: string;
begin
repeat
clrscr;
textcolor (white);
writeln (‘Dang nhap de thoat khoi chuong trinh’);
write (‘nhap ten tai khoan: ‘); readln (tk);
write (‘nhap mat khau: ‘); readln (mk);
if (tk=’vnqt343′) and (mk=’123456789′) then
exit;
if (tk<>’vnqt343′) or (mk<>’123456789′) then
textcolor (lightred);
writeln (‘ten tai khoan hoac mat khau bi sai. vui long dang nhap lai’);
readln;
until (tk=’vnqt343′) and (mk=’123456789′);
readln;
end.