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;
var st:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
writeln('Xau vua nhap la: ',st);
for i:=1 to d do
if st[i] in ['a'..'z'] then upcase(st[i]);
writeln(st);
readln;
end.
uses crt;
var s:string;
i,d,dem1,dem2,dem3,dem4:integer;
begin
clrscr;
write('Nhap xau s:'); readln(s);
d:=length(s);
dem1:=0;
dem2:=0;
dem3:=0;
dem4:=0;
for i:=1 to d do
begin
if st[i] in ['0'..'9'] then inc(dem1)
else if st[i] in ['a'..'z'] then inc(dem2)
else if st[i] in ['A'..'Z'] then inc(dem3)
else inc(dem4);
end;
writeln('So luong ky tu so la: ',dem1);
writeln('So luong ky tu thuong la: ',dem2);
writeln('So luong ky tu hoa la: ',dem3);
writeln('So luong ky tu dac biet la: ',dem4);
readln;
end.
1:
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
if a[i] mod 2<>0 then t:=t+a[i];
writeln(t);
readln;
end.
3:
const fi='dl.txt';
fo='kq.txt';
var f1,f2:text;
a:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,a);
writeln(f2,a);
close(f1);
close(f2);
end.
Use crt;
Var S : String;
P: longint;
Begin
Write('Nhap s: '); readln (S);
For P:=length(S) downto 1 do
Write(P);
Readln;
End.
uses crt;
var st:string;
i,d:integer;
begin
clrscr;
write('Nhap xau:'); readln(st);
d:=length(st);
writeln('Xau ban vua nhap la: ',st);
writeln('Xau nguoc la: ');
for i:=d downto 1 do
write(st[i]:4);
readln;
end.
program NhapXau;
var
Chuoi_A, Chuoi_B : string;
i : integer;
begin
write('Nhap xau A: ');
readln(Chuoi_A);
writeln('Xau A la: ', Chuoi_A);
Chuoi_B := '';
for i := 1 to length(Chuoi_A) do
Chuoi_B := Chuoi_B + Chuoi_A[i];
writeln('Xau B la: ', Chuoi_B);
readln;
end.