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.

10 tháng 3 2021

#include <bits/stdc++.h>

using namespace std;

double a,b,s1,s2;

int main()

{

cin>>a>>b;

s1=2*a*b;

s2=(a*a*pi)/2;

cout<<fixed<<setprecision(2)<<s1+s2;

return 0;

}

12 tháng 1 2022

sai rồi nhưng cũng cảm ơn bạn nha.

 

29 tháng 12 2020

Input: chiều cao h và cạnh a

Output: diện tích hình tam giác

29 tháng 12 2020

B1: nhập 2 cạnh a,h

B2: s:=(a*h)/2;

B3: in ra màn hình

B4: kết thúc ct

19 tháng 10 2021

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;

}

24 tháng 12 2020

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.

19 tháng 12 2021

Bài 3: 

#include <bits/stdc++.h>

using namespace std;

long long a,b;

int main()

{

cin>>a>>b;

cout<<a%b;

cout<<a/b;

return 0;

}

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

}