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.
cau 1:
uses crt;
var a:array[1..100] of integer;
n,i,min: integer;
begin
readln(n);
for i:=1 to n do
readln(a[i]);
min:=a[1];
for i:=2 to n do
if min>a[i] then min=a[i];
writeln(a[i]);
readln;
end.
cau 2:
uses crt;
g:text;
s:string;
const fo='CHUSO.TXT';
begin
assign(g,fo);
rewrite(g);
readln(s);
for i:=1 to length(s) do
if not((s[i] in ['a'..'z'])and(s[i] in ['A'..'Z])) then delete(s,i,1);
writeln(g,s);
end.
1:
uses crt;
const fi='ketqua.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if st[i]=#32 then delete(st,i,1);
writeln(f1,st);
close(f1);
end.
2:
uses crt;
var a,b,c,d:integer;
{----------chuong-trinh-con-----------------------}
function min(x,y:integer):integer;
begin
if x<y then min:=x
else min:=y;
end;
{---------------chuong-trinh-chinh--------------------}
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
write('d='); readln(d);
writeln(min(a,min(b,min(c,d))));
readln;
end.
Bài 3:
uses crt;
const fi='teptong.txt';
var a,b:integer;
f1:text;
begin
clrscr;
assign(f1,fi); rewrite(f1);
readln(a,b);
writeln(a+b);
writeln(f1,a+b);
close(f1);
readln;
end.