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.
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.
const fi='dulieu.txt';
fo='ketqua.txt';
var f1,f2:text;
a,b:array[1..100]of integer;
n,i:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n],b[n]);
end;
for i:=1 to n do
begin
if (a[i]<b[i]) then writeln(f2,a[i])
else writeln(f2,b[i]);
end;
close(f1);
close(f2);
end.
uses crt;
const fi='input.txt';
fo='output.txt';
var f1,f2:text;
a,b:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,a,b);
if (a=0) and (b=0) then writeln(f2,'Phuong trinh co vo so nghiem');
if (a<>0) then writeln(f2,-b/a:4:2);
if (a=0) and (b<>0) then writeln(f2,'Phuong trinh vo nghiem');
close(f1);
close(f2);
end.
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.
uses crt;
const fi='hcn.dat';
fo='chuvi.out';
var f1,f2:text;
a,b:array[1..100]of integer;
n,i,j:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
n:=n+1;
readln(f1,a[n],b[n]);
end;
for i:=1 to n do
writeln(a[i]*b[i]);
for i:=1 to n do
writeln(f2,2*(a[i]+b[i]));
close(f1);
close(f2);
readln;
end.
const fi='hcn.inp';
fo='hcn.out';
var f1,f2:text;
a,b:array[1..100]of integer;
i,j,n:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
inc(n);
readln(f1,a[n],b[n]);
end;
for i:=1 to n do
writeln(f2,2*(a[i]+b[i]),' ',a[i]*b[i]);
close(f1);
close(f2);
end.
const fi='hcn.inp';
fo='hcn.out';
var f1,f2:text;
a,b:array[1..100]of integer;
i,j,n:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eof(f1) do
begin
inc(n);
readln(f1,a[n],b[n]);
end;
for i:=1 to n do
writeln(f2,2*(a[i]+b[i]),' ',a[i]*b[i]);
close(f1);
close(f2);
end.
uses crt;
const fi='dulieu.txt';
var f1:text;
a,b:array[1..100]of integer;
n,i: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
writeln(a[i]+b[i]);
close(f1);
readln;
end.