tính diện tích hình tam giác với 3 cạnh được nhập từ bàn phím
K
Khách
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.
Những câu hỏi liên quan
AP
14 tháng 10 2021
c++
#include<bits/stdc++.h>using namespace std;int main(){float a,b,c;cin>>b>>c>>a;float p=(a+b+c)/2;//cai nay minh ap dung he thu herong cho no nhanh nhacout<<sqrt(p*(p-a)*(p-c)*(p-b));return 0;}pascaluses crt;var a,b,c,p:real;begin clrscr;readln(a,b,c);p:=(a+b+c)/2;write(sqrt(p*(p-a)*(p-b)*(p-c)):4:2);readln;end.
NL
Nguyễn Lê Phước Thịnh
CTVHS
18 tháng 12 2021
#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;
}
NL
Nguyễn Lê Phước Thịnh
CTVHS
8 tháng 1 2022
#include <bits/stdc++.h>
using namespace std;
double a,b,c,h,p,s;
int main()
{
cin>>a>>b>>c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
if (s>50) cout<<"Dien tich tam giac lon hon";
else cout<<"Dien tich tam giac nho hon";
return 0;
}

#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;
}