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.

24 tháng 4 2020

Program hotrotinhoc_hoc24;

const fi='BT.TXT';

fo='KQ.TXT';

var f: text;

x,y,z: integer;

t: longint;

procedure ip;

begin

assign(f,fi);

reset(f);

read(f,x,y,z);

close(f);

end;

procedure out;

begin

assign(f,fo);

rewrite(f);

t:=x+y+z;

write(f,t);

close(f);

end;

begin

ip;

out;

end.

const fi='mang.txt';

fo='tong.txt';

var f1,f2:text;

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

n,i,t:integer;

begin

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

assign(f2,fo); rewriteln(f2);

n:=0;

while not eof(f1) do 

  begin

inc(n);

read(f1,a[n]);

end;

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln(f2,t);

close(f1);

close(f2);

end.

26 tháng 12 2019

Đáp án đúng : B

có chức năng giúp cho chúng ta có thể thực hiện được những bài toán khi dữ liệu vào nằm trên tệp

14 tháng 4 2022

Program HOC24;

var f1,f2: text;

a,b: integer;

t: longint;

begin

assign(f1,'input.pas');

reset(f1);

assign(f2,'output.pas');

rewrite(f2);

readln(f1,a,b);

t:=a*b;

write(f2,t);

close(f1);

close(f2);

End.

const fi='vanban.inp';

fo='vanban.out';

var f1,f2:text;

dem,i:integer;

a:array[1..1000]of string;

begin

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

assign(f2,fo); rewrite(f2);

dem:=0;

while not eof(f1) do 

begin

inc(dem);

readln(f1,a[dem]);

end;

writeln(f2,dem);

close(f1);

close(f2);

end.