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.
![](https://rs.olm.vn/images/avt/0.png?1311)
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;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
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;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
CÂU 1:
program hinhchunhat;
var a,b,S,C: real;
begin
Write('Nhapdodaicanhthuchata=');readln(a);
Write('Nhapdodaicanhthuhaib=');readln(b);
S:= a*b;
C:=(a+b)*2;
Writeln('Dientichhinhchunhatla:',S);
Writeln('Chuvihinhchunhatla:',C);
readln
end.
CHÚC BẠN HỌC TỐT!
CÂU 2:(lưu ý: câu này thì mik viết chương trình với bán kính hình tròn là sớ thực được nhập từ bàn phím còn số dương thì bn tự tìm hiểu nhe. nếu tìm hiểu đc thì bn chỉ cần thay phần khai báo var thôi nhe.)
program hinhtron;
var r:real;
const pi=3.14;
begin
clrscr;
Write('Nhapbankinh:');readln(r);
Writeln('Chuvihinhtronla:',2*pi*r);
Writeln('Dientichhinhtronla:',pi*r*r);
readln
end.
CHÚC BẠN HỌC TỐT (x2)
![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
#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;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
double a;
int main()
{
cin>>a;
cout<<a*4<<endl;
cout<<a*a;
return 0;
}
1.
Var a , b : integer;
S , P : real;
Begin
write (' a = '); read (a);
write (' b = '); read (b);
P : = (a + b) * 2;
S : = a*b ;
write (' chu vi hinh chu nhat la ', P );
write (' dien tich hinh chu nhat la',S);
Readln;
End.
2.
Var a : integer;
P , S : real;
Begin
write (' a = '); read (a);
P : = a * 4 ;
S : = a*a;
write (' chu vi hinh vuong la ', P );
write (' dien tich hinh vuong la',S);
Readln ;
End .
Còn lại tự làm nha
Chúc bạn học tốt
Bài dễ quá mà ko bt làm sao
var R: real;
begin
write('Nhap ban kinh hinh tron R = '); readln(R);
writeln('Chu vi hinh tron la: ',R*2*Pi);
writeln('Dien tich hinh tron la: ',R*R*Pi);
readln;
end.