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='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.
const fi='hcn.txt';
fo='ketqua.txt';
var f1,f2:text;
a,b:array[1..100]of integer;
n:integer;
cv,dt:real;
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
begin
cv:=(a[i]+b[i])/2;
dt:=a[i]*b[i];
writeln(f2,cv:4:2,' ',dt:4:2);
end;
close(f1);
close(f2);
end.
#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;
}
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='sn.inp';
fo='sn.out';
var f1,f2:text;
a,b:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,a,b);
writeln(f2,a-b);
close(f1);
close(f2);
end.
#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;
}