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='kq.txt';
var a:array[1..10]of integer;
i,n,dem:integer;
f1:text;
begin
clrscr;
n:=10;
for i:=1 to n do readln(a[i]);
assign(f1,fi); rewrite(f1);
for i:=1 to n do write(f1,a[i]:4);
writeln(f1);
dem:=0;
for i:=1 to n do if a[i]>0 then dem:=dem+1;
writeln(f1,dem);
close(f1);
readln;
end.
uses crt;
const fi='kq.txt';
var a:array[1..10]of integer;
i,n:integer;
f1:text;
begin
clrscr;
n:=10;
for i:=1 to n do readln(a[i]);
assign(f1,fi); rewrite(f1);
for i:=1 to n do
begin
if (n%5<>0) then write(f1,a[i]:4);
else writeln(f1);
end;
close(f1);
readln;
end.
uses crt;
const fi='kq.txt';
var a:array[1..15]of real;
i,n:integer;
f1:text;
begin
clrscr;
n:=15;
for i:=1 to n do readln(a[i]);
assign(f1,fi); rewrite(f1);
for i:=1 to n do
begin
if (i mod 5=0) then writeln(f1)
else write(f1,a[i],' ');
end;
close(f1);
readln;
end.
const fi='input.txt';
fo='soan.txt';
var f1,f2:text;
a:array[1..100]of integer;
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;
readln(f1,a[n]);
end;
for i:=1 to n do
if a[i]<0 then writeln(f2,a[i]:4);
close(f1);
close(f2);
end.
uses crt;
const fi='dl.txt';
fo='soam.txt';
var f1,f2:text;
a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eoln(f1) do
begin
n:=n+1;
read(f1,a[n]);
end;
for i:=1 to n do
begin
if a[i]>0 then writeln('Can bac hai cua ',a[i],' la: ',sqrt(a[i]):4:2)
else if a[i]<0 then write(f2,a[i]:4);
end;
close(f1);
close(f2);
readln;
end.
tk
uses crt;
const fi='kq.txt'
var a:array[1..10]of integer;
i,n,dem:integer;
f1:text;
begin
clrscr;
n:=10;
for i:=1 to n do readln(a[i]);
assign(f1,fi); rewrite(f1);
for i:=1 to n do write(f1,a[i]:4);
writeln(f1);
dem:=0;
for i:=1 to n do if a[i]>0 then dem:=dem+1;
writeln(f1,dem);
close(f1);
readln;
end.
Mong mn giúp sớm2 vs ạ