Program Khao_Sat_Hai_Duong_Tron;
Var R 1, R2 ,x1, y1,x2,y2, Kc, Tong, Hieu: Real;
BEGIN
Writeln('KHAO SAT 2 DUONG TRON');
Writeln('----------------------------------------------------');
Writeln;
Writeln('*Duong tron thu nhat');
Write(' +Ban kinh: '); Readln(R1);
Write(' +Toa do x: '); Readln(x1);
Write(' +Toa do y: '); Readln(y1);
writeln;
Writeln('*Duong tron thu hai');
Write(' +Ban kinh: '); Readln(R2);
Write(' +Toa do x: '); Readln(x2);
Write(' +Toa do y: '); Readln(y2);
Kc:=Sqrt(Sqr(x1 – x2) + Sqr(y1 – y2));
Tong:=R1 + R2; Hieu:=ABS(R1 – R2);
If (Kc = 0) AND (Hieu = 0) Then
Writeln('-Hai duong tron trung nhau')
Else
If (Hieu > Kc) Then
Writeln('-Hai duong tron long nhau')
Else If (T OR (Hieu = Kc) Then
Writeln('-Hai duong tron tiep xuc nhau')
Else If (Tong > Kc) AND (Hieu < Kc) Then
Writeln('-Hai duong tron cat nhau ')
Else If (Tong < Kc) Then
Writeln('-Hai duong tron o ngoai nhau-');
Readln
End.