nhập vào 4 số a, b, c, d viết chương trình kiểm tra xem 4 cạnh đó có phải là độ dài của 1 hình thoi không
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Answers ( )
program hinh_thoi;
uses crt;
var a,b,c,d:integer;
begin
clrscr;
write(‘Nhap a: ‘); readln(a);
write(‘Nhap b: ‘); readln(b);
write(‘Nhap c: ‘); readln(c);
write(‘Nhap d: ‘); readln(d);
if (a=b) and (b=c) and (c=d) and (a>0) and (b>0) and (c>0) and (d>0) then
write(‘La hinh thoi’)
else write(‘Khong phai la hinh thoi’);
readln;
end.