CODE THAM KHẢO:
Program KIEM_TRA_DIEM_THUOC_DUONG_TRON;
Uses crt;
Var x0,y0,xa,ya,d,r:real;
Begin
CLRSCR;
Writeln('KIEM TRA DIEM THUOC DUONG TRON:');
Writeln('--------------------------------------------------------');
Write('Nhap ban kinh R= ');readln(r);
Write('Nhap toa do tam duong tron = '); readln(x0, y0);
Write('Nhap toa do diem a = '); readln(xa, ya);
d:=SQRT(SQR(xa-x0)+SQR(ya-y0));
If r=d then Writeln('Diem A nam tren duong tron')
Else
If d>r then Writeln('Diem A nam ngoai duong tron')
Else Writeln('Diem A nam trong duong tron');
Readln;
End.
Đăng nhận xét