Những câu hỏi liên quan
Lê Vũ Khánh Thy
Xem chi tiết
Silver Enver
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 10 2021 lúc 23:33

Câu 2: 

#include <bits/stdc++.h>

using namespace std;

double a,b,cv,dt;

int main()

{

cin>>a>>b;

cv=(a+b)*2;

dt=a*b;

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

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

return 0;

}

Bình luận (0)
Bùi Trần Nghĩa Hưng
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 10 2021 lúc 0:17

Câu 1: 

#include <bits/stdc++.h>

using namespace std;

double a,b,c;

int main()

{

cin>>a>>b>>c;

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

return 0;

}

Bình luận (0)
Đỗ Thành Nhân
3 tháng 5 lúc 11:14

nbbnbnbbnn\(\dfrac{^{ }}{ }\)

Bình luận (0)
Nguyên Bibi
Xem chi tiết
Nguyễn Lê Phước Thịnh
18 tháng 12 2021 lúc 10:52

1:

#include <bits/stdc++.h>

using namespace std;

double a;

int main()

{

cin>>a;

cout<<a*a;

return 0;

}

Bình luận (0)
phạm hoàng phú
Xem chi tiết
XTN - GAMING
Xem chi tiết
Nguyễn Lê Phước Thịnh
21 tháng 3 2022 lúc 10:19

1:

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<a+b;

return 0;

}

2:

#include <bits/stdc++.h>

using namespace std;

double s,r;

int main()

{

cin>>r;

s=r*r*pi;

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

return 0;

}

Bình luận (0)
Nguyễn Thị Bích Huyền
Xem chi tiết
Nguyễn Lê Phước Thịnh
20 tháng 12 2020 lúc 10:42

Câu 1:

uses crt;

var a,b,c,p,s: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 

   begin

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

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

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

end

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

readln;

end.

Câu 2: 

uses crt;

var a:array[1..100]of integer;

i,n,t,max,min:integer;

begin

clrscr;

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

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln('Tong cac phan tu trong day la: ',t);

max:=a[1];

min:=a[1];

for i:=1 to n do 

  begin

     if max<a[i] then max:=a[i];

if min>a[i] then min:=a[i];

end;

writeln('Gia tri lon nhat la: ',max);

writeln('Gia tri nho nhat la: ',min);

readln;

end. 

Bình luận (1)
5-Hồ Hũu Dương-9C
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 1 2023 lúc 14:59

uses crt;

var a,b:integer;

begin

clrscr;

readln(a,b);

writeln((a+b)*2);

writeln(a*b);

readln;

end.

Bình luận (0)
Yến Nhi
Xem chi tiết