Uses Crt,Graph;
Var a,b,c,d,i,j,m,n:integer;
x:string;
y:char;
S,P:real;
Procedure Viet(a:string);
Var i:integer;
Begin
For i:=1 to length(a) do Begin Write(a[i]);Delay(20)End;
End;
Procedure Ve(x,k,n,j:integer);
Var i:integer;
Begin
If j=1 then For i:=k to n do Begin GotoXY(i,x);Viet('*')End;
If j=2 then For i:=n downto k do Begin GotoXY(i,x);Viet('*')End;
If j=3 then For i:=k to n do Begin GotoXY(x,i);Viet('*')End;
If j=4 then For i:=n downto k do Begin GotoXY(x,i);Viet('*')End
End;
Procedure clr(y,k,n,j:integer);
Var i:integer;
Begin
GotoXY(k,y);Textcolor(8);;Delay(30);
If j=1 then For i:=1 to n do Write(#3);
If j=2 then For i:=1 to n do Write(' ');
Delay(30)
End;
Procedure Clrtb;
Var i:integer;
Begin
For i:=6 to 44 do clr(i,2,78,1);
For i:=6 to 44 do clr(i,2,78,2);
End;
Procedure Thoat;
Var i:integer;
Begin
For i:=1 to 80 do clr(i,1,80,2);
Textcolor(10);
GotoXY(23,25);Viet('Creat by qx and Knight Blackcat');
GotoXY(31,27);Viet('Desgin by qx');Delay(1000);
Exit;
End;
Procedure Luachon(var m:integer; x,y:integer);
Begin
Ve(35,20,58,2);Ve(20,36,40,3);Ve(41,20,58,1);Ve(58,36,40,4);
GotoXY(25,38);Viet('Ban hay lua chon: ');Read(m);
While not (m in [x..y]) do
Begin
GotoXY(43,38);Write(' ');
GotoXY(41,38);Viet(': ');Read(m);
End;
End;
Procedure Debai;
Begin
Textcolor(15);Ve(15,10,70,1);Textcolor(10);
GotoXY(33,7);Viet('De bai: ');
GotoXY(32,17);Viet('Bai giai: ');
End;
Procedure ChuongI;
Procedure Bai19;
Begin
GotoXY(5,9);Viet('Nhap vao ho ten diem toan , diem tin, tuoi, in ra bang diem');
GotoXY(5,20);Viet('Nhap ten : ');Readln(x);
GotoXY(5,21);Viet('Nhap tuoi : ');Read(a);
GotoXY(5,22);Viet('Nhap dtoan : ');Read(b);
GotoXY(5,23);Viet('Nhap dtin : ');Read(c);
GotoXY(5,24);Viet('Bang Diem cua ');Write(x,':');
GotoXY(5,25);Write(a,'tuoi');
GotoXY(5,26);Write('Diem toan: ',b,' diem');
GotoXY(5,27);Write('Diem tin: ',c,' diem');
GotoXY(5,28);Write('Diem trung binh: ',(b*2+c)/3:8:2,' diem')
End;
Procedure Bai20;
Begin
GotoXY(5,9);Viet('Nhap vao ho ten , luong, chiet khau in ra bang luong');
GotoXY(5,20);Viet('Nhap ten : ');Readln(x);
GotoXY(5,21);Viet('He so luong : ');Read(b);
GotoXY(5,22);Viet('Phu cap % : ');Read(c);
GotoXY(5,23);Viet('Bao hiem % : ') ;Read(d) ;
GotoXY(5,24);Write('Bang luong cua ',x,':') ;
GotoXY(5,25);Write('luong goc ',b);
GotoXY(5,26);Write('Cong phu cap ',c,'% = ',c*b ) ;
GotoXY(5,27);Write('Tru bao hiem ',d, '% = ', d*b ) ;
GotoXY(5,28);Write('Vay nhan duoc ',b+c*b-d*b)
End;
Begin
Textcolor(9);
For i:=1 to 10 do Begin GotoXY(15,9+2*i);Viet('Bai ');Write(i)End;
For i:=1 to 10 do Begin GotoXY(57,9+2*i);Viet('Bai ');Write(10+i)End;
GotoXY(34,31);Textcolor(11);Viet('12. Thoat');
Luachon(m,1,22);
If m<=20 then Begin Clrtb;Debai;Textcolor(13);a:=0;b:=0;c:=0;d:=0;S:=0;P:=0 End;
Case m of
19:Bai19;20:Bai20;
21:Thoat;
End;
End;
BEGIN
ChuongI;
END.