K
Khách

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.

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.

Uses crt;

Const fi='input.txt';

Fo='output.txt';

Var f1,f2:text;

A,b:array[1..100] of integer;

I,n:integer;

Begin

Clrscr;

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

Writeln('Chu vi hinh chu nhat thu ',i,' la: ',(a[i]+b[i])*2);

Writeln(f2,Chu vi hinh chu nhat thu ',i,' la: ',(a[i]+b[i])*2);

End;

Close(f1);

Close(f2);

Readln;

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;

}

uses crt;

const fi='x.inp';

var f1:text;

a,b:array[1..100]of integer;

i,n:integer;

begin

assign(f1,fi); reset(f1);

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

writeln('Chu vi dong ',i,' la: ',(a[i]+b[i])*2);

writeln('Dien tich dong ',i,' la: ',a[i]*b[i]);

end;

close(f1);

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='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.

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 la: ',(a+b)*2);

writeln('Dien tich la: ',a*b);

close(f1);

readln;

end.

9 tháng 4 2023

Program HOC24;

var i,n: integer;

c: array[1..1000] of integer;

f: text;

begin

assign(f,'MANG3.TXT');

reset(f);

readln(f,n);

for i:=1 to n do read(f,c[i]);

close(f);

for i:=1 to n do if c[i] mod 2=1 then write(c[i],' ');

readln

end.

cứu e với mn