Bạn chưa đăng nhập. Vui lòng đăng nhập để hỏi bài

Những câu hỏi liên quan
Vy Chou
Xem chi tiết
Minh Lệ
24 tháng 4 2020 lúc 21:25

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.

Bùi Thị Ngọc
Xem chi tiết
Dương Hữu Thành
Xem chi tiết
linh thuy
Xem chi tiết
Nguyễn Lê Phước Thịnh
9 tháng 2 2020 lúc 18:00

const fi='bt.txt';

fo='kt.txt';

var f1,f2:text;

a,b,c,tbc:real;

begin

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

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

readln(f1,a,b,c);

tbc:=(a+b+c)/3;

writeln(f2,tbc:4:2);

close(f1);

close(f2);

end.

Khách vãng lai đã xóa
Trần Văn Lượng
Xem chi tiết
Nguyễn Lê Phước Thịnh
1 tháng 5 2021 lúc 21:44

uses crt;

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

i,n,max,min:integer;

begin

clrscr;

write('Nhap n='); readln(n);

for i:=1 to n do

  begin

write('A[',i,']='); readln(a[i]);

end;

max:=a[1];

min:=a[1];

for i:=1 to n do 

  begin

if max<a[i] then max:=a[i];

if min>a[i] then min:=a[i];

end;

writeln('So lon nhat la: ',max);

writeln('So nho nhat la: ',min);

readln;

end.

HoangNhuNguyet
Xem chi tiết
Mạnh Cường Đào Huỳnh
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 5 2022 lúc 23:55

const fi='input.txt'

fo='output.txt'

var f1,f2:text;

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

i,n,t:integer;

begin

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

assign(f2,fo); rewrite(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];

write(f2,t);

close(f1);

close(f2);

end.

Felix MC-Gamer
Xem chi tiết
Phạm Thị Thu Hằng
Xem chi tiết
Nguyễn Lê Phước Thịnh
4 tháng 5 2021 lúc 13:48

uses crt;

const fi='so.txt'

var f1:text;

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

n,i:integer;

begin

clrscr;

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

readln(f1,n);

for i:=1 to n do  

  read(f1,a[i]);

for i:=1 to n do 

  write(a[i]:4);

close(f1);

readln;

end.