A) PROGRAM BAI8A;PROGRAM BAI8A;PROGRAM BAI8A;PROGRAM BAI8A; USES C...

8.

a)

program bai8a;

program bai8a;

uses crt;

t;

t;

t;

uses cr

var x,y:real;

var x,y:real;

kt:boolean;

kt:boolean;

kt:boolean;

kt:boolean;

begin

begin

clrscr;

clrscr;

write('Nhap x: ');readln(x);

write('Nhap x: ');readln(x);

write('Nhap y: ');readln(y);

write('Nhap y: ');readln(y);

kt:=false;

kt:=false;

if ((y<1) or (y=1)) and ((y>abs(x)) or (y=abs(x)))

then

then

kt:=true;

kt:=true;

if kt then write('Diem vua nhap thuoc phan gach

cheo')

cheo')

Great by: Nguyễn Trọng Hoàng Email: [email protected]

else write('Khong thu

else write('Khong thuoc');

oc');

oc');

oc');

readln

readln

end

end

end

end.

.

.

.

Ví Dụ

Ví Dụ

b)

program bai8;

program bai8;

uses crt;

uses crt;

if (abs(y)<=1) and (abs(x)<=1) then

if (abs(y)<=1) and (abs(x)<=1) then

if kt then write('Diem vua nhap thuoc phan ga

if kt then write('Diem vua nhap thuoc phan gach

ch

ch

ch

else write('Khong thuoc');

else write('Khong thuoc');

end

end.

.

.

.