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)
with open('DULIEU.INP', 'r') as input_file:
p, q = map(int, input_file.readline().strip().split())
chu_vi = 2 * (p + q)
dien_tich = p * q
with open('KETQUA.OUT', 'w') as output_file:
output_file.write(f'Chu vi hinh chu nhat la: {chu_vi}\n')
output_file.write(f'Dien tich hinh chu nhat la: {dien_tich}\n')
![](https://rs.olm.vn/images/avt/0.png?1311)
with open('DULIEU.INP', 'r') as input_file:
p, q = map(int, input_file.readline().strip().split())
chu_vi = 2 * (p + q)
dien_tich = p * q
with open('KETQUA.OUT', 'w') as output_file:
output_file.write(f'Chu vi hinh chu nhat la: {chu_vi}\n')
output_file.write(f'Dien tich hinh chu nhat la: {dien_tich}\n')
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
freopen("sn.inp","r",stdin);
freopen("cn.out","w",stdout);
cin>>a>>b;
cout<<a*b;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
const fi='dulieu.dat';
var f1:text;
a,b,p,s:array[1..100]of real;
i,n:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(a[n],b[n]);
end;
for i:=1 to n do
begin
p[i]:=(a[i]+b[i])/2;
s[i]:=a[i]*b[i];
end;
for i:=1 to n do
writeln(p[i]:4:2,' ',s[i]:4:2);
close(f1);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
long long m,n,t,i;
int main()
{
freopen("dulieu.inp","r",stdin);
freopen("ketqua.out","w",stdout);
cin>>m>>n;
t=0;
for (i=m; i<=n; i++)
if (i%2!=0) t+=i;
cout<<t;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
const fi='hinhtron.inp';
fo='hinhtron.out';
var f1,f2:text;
a:array[1..100]of real;
i,n:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
read(f1,a[n]);
end;
for i:=1 to n do
writeln(f2,'Hinh tron thu ',i,': Chu vi la ',(2*a[n]*pi):4:2,' va Dien tich la: ',a[n]*a[n]*pi:4:2);
close(f1);
close(f2);
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
const fi='baitap.txt';
var f1:text;
a,b:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
readln(f1,a,b);
writeln('Chu vi hinh chu nhat la: ',(a+b)*2);
close(f1);
readln;
end.
Program HOC24;
var f: text;
p,q: integer;
const fi='DULIEU.INP';
fo='KETQUA.OUT';
function dt(a,b: integer): longint;
var t: longint;
begin
t:=a*b;
dt:=t;
end;
function cv(a,b: integer): longint;
var t: longint;
begin
t:=(a+b)*2;
cv:=t;
end;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,p,q);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
writeln(f,'Chu vi hinh chu nhat la: ',cv(p,q));
write(f,'Dien tich hinh chu nhat la: ',dt(p,q));
close(f);
end;
begin
ip; out;
end.