* Tính diện tích hình chữ nhật
program dthcn;
var
a, b, c : integer;
begin
Write ('Nhap chieu dai:'); read (a);
Write ('Nhap chieu rong:'); read (b);
s := a * b;
Write ('Dien tich hinh chu nhat la:',s);
Readln
End.
* Tính diện tích hình thang
program dtht;
var
a, b, h:Integer;
s:real;
begin
Write('Nhap day lon:');readln(a);
Write('Nhap day nho:');readln(b);
Write('Nhap chieu cao:');readln(h);
s:=((a+b)*h)/2;
WriteLn ('Dien tich hinh thang la:',s);
readln
end.
* Tính diện tích tam giác
program dttg;
var
a, h : integer;
s : real;
begin
Write ('Nhap chieu cao:'); read (h);
Write ('Nhap day:'); read (a);
s := 1/2 * a * h;
Write ('Dien tich tam giac la:',s);
Readln
End.
* Tính diện tích hình bình hành
program dthbh;
var
a, h : integer;
s : real;
begin
Write ('Nhap chieu cao:'); read (h);
Write ('Nhap day:'); read (a);
s := a * h;
Write ('Dien tich hinh binh hanh la:',s);
Readln
End.
* Tính diện tích hình tròn
program dthtr;
const
pi=3.14;
var
r:Real;
s:Real;
begin
Write('Nhap ban kinh:'); readln(r);
s:=r*r*pi;
write('Dien tich hinh tron:',s);
readln
end.
-----------------------
@vietdorapan
Program TINH_DIEN_TICH;
Uses crt;
Procedure HV;
Var s,a:real;
Begin
Writeln('TINH DIEN TICH HINH VUONG:');
Write('Nhap chieu dai cua canh a = ');readln(a);
s:=a*a;
Writeln('Dien tich hinh vuong = ',s:6:2);
End;
Procedure HT;
Var s,r:real;
Begin
Writeln('TINH DIEN TICH HINH TRON:');
Write('Nhap ban kinh R = ');readln(r);
s:=pi*r*r;
Writeln('Dien tich hinh tron = ',s:6:2);
End;
Procedure TG;
Var a, b, c,s,p:real;
Begin
Writeln('TINH DIEN TICH TAM GIAC:');
Write('nhap a =');readln(a);
Write ('nhap b =');readln(b);
Write('nhap c =');readln(c);
If ((a+b)>c)and((b+c)>a)and((a+c)>b) then
Begin
p:=(a+b+c)/2;
s:=sqrt(p*(p-a)*(p-b)*(p-c));
Writeln('Chu vi tam giac:',2*p:4:2) ;
Writeln('Dien tich tam giac:',s:4:2);
End
Else
Writeln(a,', ',', ',c,' khong phai la ba canh cua tam giac') ;
End;
Procedure CN;
Var a, b, s:real;
Begin
Writeln('TINH DIEN TICH HINH CHU NHAT:');
Write('Nhap chieu dai a =');readln(a);
Write('Nhap chieu rong b= ');readln(b);
s:= a*b;
Writeln('Dien tich hinh chu nhat, s= ',s:6:2);
End;
Procedure menu;
Var d:integer;
Begin
Clrscr;
Writeln('CHON MOT TRONG CAC PHUONG AN SAU:');
Writeln('----------------------------------');
Writeln('0: Quay ve man hinh soan thao');
Writeln('1: Tinh dien tich hinh vuong');
Writeln('2: Tinh dien tich hinh tron');
Writeln('3: tinh dien tich tam giac');
Writeln('4: Tinh dien tich hinh chu nhat');
Writeln('====================');
Write(' Hay chon mot phuong an: '); readln(d);
Writeln('====================');
Writeln;
Case d of
0: Exit;
1: HV;
2: HT;
3: TG;
4: CN;
End;
End;
Begin
menu;
Readln;
End.
Tin học, tiếng Anh: informatics, tiếng Pháp: informatique, là một ngành khoa học chuyên nghiên cứu quá trình tự động hóa việc tổ chức, lưu trữ, xử lý và truyền dẫn thông tin của một hệ thống máy tính cụ thể hoặc trừu tượng (ảo). Với cách hiểu hiện nay, tin học bao hàm tất cả các nghiên cứu và kỹ thuật có liên quan đến việc mô phỏng, biến đổi và tái tạo thông tin.
Nguồn : Wikipedia - Bách khoa toàn thưLớp 8 - Năm thứ ba ở cấp trung học cơ sở, học tập bắt đầu nặng dần, sang năm lại là năm cuối cấp áp lực lớn dần nhưng các em vẫn phải chú ý sức khỏe nhé!
Nguồn : ADMIN :))Xem thêm tại https://loigiaisgk.com/cau-hoi or https://giaibtsgk.com/cau-hoi
Copyright © 2021 HOCTAPSGK