Những câu hỏi liên quan
hà nội 123
Xem chi tiết
Nguyễn Lê Phước Thịnh
13 tháng 5 2021 lúc 16:59

1:

function dt(r:real):real;

begin

dt:=sqr(r)*pi;

end;

Bình luận (0)
Nguyễn Lê Phước Thịnh
13 tháng 5 2021 lúc 16:59

2:

function dt(a,b:real):real;

begin

dt:=1/2*a*b;

end;

Bình luận (0)
Nguyễn Lê Phước Thịnh
13 tháng 5 2021 lúc 16:59

3:

function dt(a,b,c:real):real;

var p,s:real;

begin

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

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

dt:=s;

end;

Bình luận (0)
Tuấn Lê
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 5 2021 lúc 9:50

uses crt;

var a,b,c,p,s,am,bn,cp:real;

begin

clrscr;

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

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

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

if (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then

begin

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

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

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

writeln('Dien tich tam giac la: ',s:4:2);

am:=sqrt(2*(sqr(b)+sqr(c))-sqr(a))/4;

bn:=sqrt(2*(sqr(a)+sqr(c))-sqr(b))/4;

cp:=sqrt(2*(sqr(a)+sqr(b))-sqr(c))/4;

writeln('Do dai duong trung tuyen ung voi canh a la: ',am:4:2);

writeln('Do dai duong trung tuyen ung voi canh b la: ',bn:4:2);

writeln('Do dai duong trung tuyen ung voi canh c la: ',cp:4:2);

end

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

readln;

end.

Bình luận (0)
Triều Phan
Xem chi tiết
Triều Phan
5 tháng 11 2021 lúc 7:26

giải giúp tôi với

 

 

Bình luận (0)
Nguyễn Lê Phước Thịnh
6 tháng 11 2021 lúc 0:46

Câu 2: 

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<a*b;

return 0;

}

Bình luận (0)
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)
Khoa Nguyễn
Xem chi tiết
lenguyenchihieu
Xem chi tiết
Minh Lệ
10 tháng 5 2023 lúc 20:50

Program HOC24;

var t: longint;

a,b: integer;

function gt(x: integer): longint;

var i: integer; tich: longint;

begin

tich:=1;

for i:=1 to n tich:=tich*i;

gt:=tich;

end;

begin

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

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

t:=gt(a)+gt(b)+gt(a-b);

write('T = ',t);

readln

end.

Bình luận (3)
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)
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)
Bảo Nam Phạm
Xem chi tiết
Tuấn Lê
Xem chi tiết
Trần Nam Khánh
19 tháng 5 2021 lúc 8:47

<bits/stdc++.h>
using namespace std;
int DTT(int a, int b, int c)

   int m = sqrt(2*b*b+2*c*c-a*a)/2;
    return m;

int main()
int a, b, c, m;
    cout << "Nhap ba canh tam giac" << endl;
    cin >> a >> b >> c;
    m = DTT(a,b,c);
    cout << m;
    return 0;

end.
 

Bình luận (0)
Nguyễn Lê Phước Thịnh
19 tháng 5 2021 lúc 9:44

uses crt;

var a,b,c:real;

{-----------------chuong-trinh-con--------------------}

function ttuyen(x,y,z:real):integer;

begin

ttuyen:=(2*(sqr(ab)+sqr(ac))-sqr(bc));

end;

{---------------chuong-trinh-chinh-----------------------}

begin

clrscr;

repeat

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

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

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

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

writeln(sqrt(ttuyen(a,b,c))/4:4:2);

readln;

end.

Bình luận (0)