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.
THAM KHẢO:
Program Chu_Nhat_Program;
Uses Crt;
Var a,b,s,c: real;
Begin
Clrscr;
Writeln(‘ TINH DIEN TICH & CHU VI HINH CHU NHAT:’);
Write(‘Nhap chieu dai=’); readln(a);
Write(‘Nhap chieu rong=’);readln(b);
s:=a*b;
c:=(a+b)*2;
Writeln(‘Dien tich hinh chu nhat la:’,s:6:2); Writeln(‘Chu vi hinh chu nhat:’,c:6:2); Readln;
End.
#include <bits/stdc++.h>
using namespace std;
long double a,b;
int main()
{
cin>>a>>b;
cout<<fixed<<setprecision(2)<<(a+b)*2<<endl;
cout<<fixed<<setprecision(2)<<a*b;
return 0;
}
uses crt;
var
a,b,p,s:integer;
begin
readln(a,b);
p:=(a+b)*2;
s:=a*b;
writeln('Chu vi va dien tich cua hcn lan luot la: ',p,s);
readln
end.
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;
}
uses crt;
var r,cd,cr,s,p: real;
begin
clrscr;
write('Nhap ban kinh: '); readln(r);
cd:=r*2*3.14;
cr:=1/3*cd;
s:=cd*cr;
p:=(cd+cr)*2;
writeln('Dien tich la: ',s);
writeln('Chu vi la: ',p);
readln;
end.
uses crt;
begin
clrscr;
writeln(5*7);
writeln(9*9*pi:4:2);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
cin>>a>>b;
cout<<fixed<<setprecision(2)<<a*b<<endl;
cout<<fixed<<setprecision(2)<<(a+b)*2;
return 0;
}