
program raf105;
var
s,s1,s2: string;
slov,numb,i,j,l: integer;
begin
writeln('Введите строку:');
readln(s);
s:= lowercase(s);
s1:= '';
s2:= '1234567890';
while j<>-1 do
begin
j+= 1;
l+= 1;
for i:=1 to length(s1) do
if (s[j] = s1[i]) and (slov = 0)
then slov+= 1
else if (i<=length(s2)) and (s[j] = s2[i])
then numb+=1;
if s[j+1] = ' '
then j:= -1;
end;
for i:=l+1 to length(s) do
begin
if s[i] = ' '
then
begin
for j:=1 to length(s1) do
if s[i+1] = s1[j]
then slov+= 1;
end
else
begin
for j:=1 to length(s2) do
if s[i] = s2[j]
then numb+=1;
end;;
end;
writeln;
writeln('В строке:');
writeln(slov,' сл.');
writeln(numb,' циф.');
end.
Язык PascalABCa = int(input())
for i in range(a):
b = input()
c = 0
d = True
e = 0
f = False
g = False
h = '\''
for j in b:
if j == '#' and not f:
g = True
break
elif j != ' ':
if d:
print(' ' * c, end='')
elif c > 0:
print(' ', end='')
c = 0
print(j, end='')
if(j == '\"' or j == '\'') and e % 2 == 0:
if f and j == h:
f = False
else:
f = True
h = j
if f:
d = True
else:
d = False
if j == '\\':
e += 1
else:
e = 0
else:
c += 1
r = j == ' '
if g and c > 1:
print(' ', end='')
if i < a - 1:
print()
1
Объяснение: