Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
Program Hinh_Tamgiac_Program;
Uses crt;
Var a,b,c,s,p : real;
Begin
Clrscr;
Writeln(‘HINH 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,’, ‘, b,’, ‘, c, ‘ khong phai la ba canh cua tam giac’) ;
Readln;
End.
uses crt;
var a:integer;
begin
clrscr;
readln(a);
writeln(a*4);
writeln(a*a);
readln;
end.
var a,b,s:integer; c:word; begin write('nhap avà b '); read(a,b); s:=a*b*1/2; c:=(a+b)*2; writeln('dien tich la '; s ); write('chu vi la 'c); readln end
Program Dien_tich_tam_giac;
Var
a,b,c:Integer;
p,s:Real;
Begin
Writeln('DIEN TICH TAM GIAC');
Writeln('------------------');
Write('-Nhap so thu nhat: ');
Readln(a);
Write('-Nhap so thu hai : ');
Readln(b);
Write('-Nhap so thu ba : ');
Readln(c);
If (a+b>c) And (b+c>a) And (c+a>b) Then
Begin
Writeln('+Dung la Tam giac');
p:=0.5*(a+b+c);
s:=Sqrt(p*(p-a)*(p-b)*(p-c));
Writeln('+Dien tich= ',s:10:2);
End
Else
Writeln('+Khong phai la Tam giac');
Writeln;
Writeln(' Bam phim <Enter> de ket thuc');
Readln
End.
uses crt;
var a:int64;
begin
clrscr;
readln(a);
writeln(a*4);
readln;
end.
Var r,s,c:real;
Begin
Write('Ban kinh = ');readln(r);
s:=3.14*r*r;
c:=2*3.14*r;
Writeln('Dien tich la ',s:10:2);
Write('Chu vi la ',c:10:2);
Readln
End.
uses crt;
var a,b,c:real;
begin
clrscr;
readln(a,b,c);
writeln(a+b+c:4:2);
readln;
end.