![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
s = input("Nhập một xâu bất kỳ: ")
print("Các ký tự và chữ số trong xâu là:")
for char in s:
if char.isdigit() or char.isalpha():
print(char)
![](https://rs.olm.vn/images/avt/0.png?1311)
1:
uses crt;
var st:string[50];
begin
clrscr;
write('Nhap xau:'); readln(st);
writeln('So luong ki tu la: ',length(st));
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Program bai1;
uses crt;
var a: array[1..1000] of integer;
Z,i,j,n: integer;
begin
clrscr;
write('nhap n ='); readln(n);
for i:= 1 to n do
begin
write('nhap a[',i,']='); readln(a[i]);
end;
for i:= 1 to n-1 do
for j:= i+1 to n do
if a[i] < a[j] then
begin
Z:=a[i];
a[i]:=a[j];
a[j]:=Z;
end;
writeln('Day Da Sap Xep La :' );
for i:= 1 to n do write(a[i] :4);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program boi_cua_3;
uses crt;
var a:array[1..100] of integer;
n,i:byte;
min:integer;
begin
clrscr;
write('nhap so luong phan tu cua mang: ');
readln(n);
for i:= 1 to n do
begin
write('nhap phan tu thu [',i,']= ');
readln(a[i]);
end;
min:=a[1];
for i:= 1 to n do
if min > a[i] then min:=a[i];
writeln('gia tri nho nhat cua day la: ',min);
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program boi_cua_3;
uses crt;
var a:array[1..100] of integer;
n,i:byte;
s:integer;
begin
clrscr;
write('nhap so luong phan tu cua mang: ');
readln(n);
for i:= 1 to n do
begin
write('nhap phan tu thu [',i,']= ');
readln(a[i]);
end;
s:=0;
for i:= 1 to n do
if a[i] mod 3 = 0 then s:=s+a[i];
writeln('vay tong cac so la boi cua 3 la: ',s);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
const fi='songuyen.txt';
fo='ketqua.txt';
var f1,f2:text;
a:array[1..100]of integer;
n,i,t:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
n:=0;
while not eoln(f1) do
begin
inc(n);
read(f1,a[n]);
end;
t:=0;
for i:=1 to n do
if a[i]>0 then t:=t+a[i];
writeln(f2,t);
close(f1);
close(f2);
end.
2:
uses crt;
var a:array[1..30]of integer;
i,dem:integer;
begin
clrscr;
for i:=1 to 30 do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if a[i] mod 5<>0 then inc(dem);
writeln('So phan tu khong chia het cho 5 la: ',dem);
readln;
end.