bai 1
begin
input num
if n>=0
if n<0
display "n la so nguyen am"
else
dislay "n la so nguyen duong"
end if
else
dislay "n=0"
end if
end.
* lưu đồ

Bai3:
BEGIN
INPUT duongkinh
Pi=3,14
chuvi = duongkinh * pi
dientich = duongkinh*duongkinh*1/4*pi
DISPLAY "chu vi hinh tron la: ,chuvi"
DISPLAY "dien tich hinh tron la: ,dientich"
END
Bai 4:
BEGIN
INPUT hight
INPUT bottom
dientich = 1/2*hight*bottom
DISPLAY "dien tich cua tam giac la: ,dientich"
END
Bai 5:
BEGIN
INPUT hight
INPUT radius
pi = 3,14
thetich = hight * pi * radius * radius
DISPLAY "the tich hinh tron la: ,thetich"
END
begin
input num
if n>=0
if n<0
display "n la so nguyen am"
else
dislay "n la so nguyen duong"
end if
else
dislay "n=0"
end if
end.
* lưu đồ

Bai3:
BEGIN
INPUT duongkinh
Pi=3,14
chuvi = duongkinh * pi
dientich = duongkinh*duongkinh*1/4*pi
DISPLAY "chu vi hinh tron la: ,chuvi"
DISPLAY "dien tich hinh tron la: ,dientich"
END
Bai 4:
BEGIN
INPUT hight
INPUT bottom
dientich = 1/2*hight*bottom
DISPLAY "dien tich cua tam giac la: ,dientich"
END
Bai 5:
BEGIN
INPUT hight
INPUT radius
pi = 3,14
thetich = hight * pi * radius * radius
DISPLAY "the tich hinh tron la: ,thetich"
END
Nhận xét
Đăng nhận xét