Những câu hỏi liên quan
nguyễn thị cẩm tiên
Xem chi tiết
Nguyễn Lê Phước Thịnh
7 tháng 11 2021 lúc 14:45

2: 

#include <bits/stdc++.h>

using namespace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

p=(a+b+c)/2;

s=sqrt(p*(p-a)*(p-b)*(p-c));

cout<<fixed<<setprecision(2)<<s;

return 0;

}

Bình luận (0)
Lê Vũ Khánh Thy
Xem chi tiết
Lanh Su
Xem chi tiết
Komado Tanjiro
19 tháng 10 2021 lúc 19:11

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

Bình luận (2)
Nguyễn Lê Phước Thịnh
19 tháng 10 2021 lúc 23:26

#include <bits/stdc++.h>

using namespace std;

double a,b,c;

int main()

{

cin>>a>>b;

c=sqrt(a*a+b*b);

cout<<fixed<<setprecision(2)<<a+b+c<<endl;

cout<<fixed<<setprecision(2)<<a*b/2<<endl;

return 0;

}

Bình luận (0)
Hải Títt
Xem chi tiết
tao quen roi
3 tháng 11 2016 lúc 22:42

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

Bình luận (0)
Ung Chiêu Tường
25 tháng 3 2017 lúc 8:53

program CVDT;

uses crt;

var a,b,c,P,S;

begin

Writeln('Nhap a va b');

Readln(a,b);

c:= a*a +b*b; S:= (a*b)/2;

Writeln('Dien tich tam giac vuong la ',S);

writeln('Chu vi tam giac vuong la ', SQRT(c);

Readln;

end.

Bình luận (0)
ngan thanh
Xem chi tiết
Nguyễn Lê Phước Thịnh
27 tháng 10 2021 lúc 21:29

#include <bits/stdc++.h>

using namespace std;

double a,b,c,p,s;

int main()

{

cin>>a>>b>>c;

p=(a+b+c)/2;

s=sqrt(p*(p-a)*(p-b)*(p-c));

cout<<"Chu vi la:"<<fixed<<setprecision(2)<<p*2<<endl;

cout<<"Dien tich la:"<<fixed<<setprecision(2)<<s;

return 0;

}

Bình luận (0)
Mỹ Uyên
Xem chi tiết
Nguyễn Lê Phước Thịnh
24 tháng 12 2020 lúc 21:16

Câu 1: 

uses crt;

var a,s,p:real;

begin

clrscr;

repeat

write('Nhap do dai canh hinh vuong:'); readln(a);

until a>0;

p:=4*a;

s:=sqr(a);

writeln('Chu vi hinh vuong la: ',p:4:2);

writeln('Dien tich hinh vuong la: ',s);

readln;

end.

Câu 2: 

uses crt;

var a,b,t,s,h:real;

begin

clrscr;

write('Nhap a='); readln(a);

write('Nhap b='); readln(b);

t:=a+b;

h:=a-b;

s:=a*b;

writeln('Tong la: ',t:4:2);

writeln('Hieu la: ',h:4:2);

writeln('Tich la: ',s:4:2);

readln;

end.

Câu 3: 

uses crt;

var a,b,c:real;

begin

clrscr;

repeat

write('Nhap a='); readln(a);

write('Nhap b='); readln(b);

write('Nhap c='); readln(c);

until (a>0) and (b>0) and (c>0);

if (a+b>c) and (a+c>b) and (b+c>a) then writeln('Day la ba canh trong mot tam giac')

else writeln('Day khong la ba canh trong mot tam giac');

readln;

end.

Bình luận (0)
pé đạt
Xem chi tiết
pé đạt
18 tháng 12 2021 lúc 7:37

mọi người giúp em giải bài này vs ạ

Bình luận (0)
Nguyễn Lê Phước Thịnh
18 tháng 12 2021 lúc 10:55

#include <bits/stdc++.h>
using namespace std;
double a,b,c,s,p;
int main()
{
    //freopen("DTTAMGIAC.inp","r",stdin);
    //freopen("DTTAMGIAC.out","w",stdout);
    cin>>a>>b>>c;
    p=(a+b+c)/2;
    s=sqrt(p*(p-a)*(p-b)*(p-c));
cout<<fixed<<setprecision(5)<<p*2<<endl;    

cout<<fixed<<setprecision(5)<<s;
    return 0;
}

 

Bình luận (0)
BUI THIEN PHUC
Xem chi tiết
HT.Phong (9A5)
13 tháng 2 2023 lúc 15:50

uses crt;

var a: integer;

begin clrscr;

Writeln('Nhap vao do dai canh cua tam giac deu: '); readln(a);

Writeln('Chu vi cua tam giac deu do la: ',a*3);

readln;

end.

Bình luận (0)
bùi thị kim liên
Xem chi tiết