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.
program ChuyenXauSangChuThuong;
var
str: string;
i: integer;
begin
write('Nhap mot xau ky tu: ');
readln(str);
for i := 1 to Length(str) do
str[i] := LowerCase(str[i]);
writeln('Xau ky tu chuyen thanh chu thuong la: ', str);
end.
Program HOC24;
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' '; n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.
var s,st: string;
i,n,max: integer;
a: array[1..1000] of string;
begin
write('Nhap xau: '); readln(s);
s:=s+' '; n:=1;
while length(s)<>0 do
begin
n:=n+1;
a[n]:=copy(s,1,pos(' ',s));
delete(s,1,pos(' ',s));
end;
max:=length(a[1]);
for i:=2 to n do if max<length(a[i]) then
begin
max:=length(a[i]);
st:=a[i];
end;
write('Tu co do dai lon nhat trong xau la: ',st);
readln
end.
program Tim_So_Le_Chia_Het_Cho_3;
uses crt;
var
n, i, count: integer;
begin
clrscr;
write('Nhap vao mot so nguyen duong n: ');
readln(n);
writeln('Cac so le chia het cho 3 nho hon ', n, ' la: ');
count := 0;
for i := 1 to n do
begin
if (i mod 2 = 1) and (i mod 3 = 0) then
begin
writeln(i);
count := count + 1;
end;
end;
writeln('Co tat ca ', count, ' so le chia het cho 3');
readln;
end.
Đề 1:
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
Đề 2:
uses crt;
var a:array[1..100]of integer;
i,n,max: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];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
Program HOC24;
var st,s: string;
a: array[1..255] of string;
d,i,n: integer;
begin
readln(s);
s:=s+' ';
while length(s)<>0 do
begin
st:=copy(s,1,pos(' ',s)-1);
n:=n+1;
a[n]:=st;
delete(s,1,pos(' ',s));
end;
for i:= n downto 1 do write(a[i],' ');
readln
end.