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.
Язык PascalABC#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "ru");
int a, b;
cout << "Введите 2 числа: ";
cin >> a;
cin >> b;
cout << "a + b = " << a+b << endl << "a - b = " << a-b << endl << "a * b = " << a*b << endl << "a / b = " << a/b << endl
<< "a % b = " << a%b << endl << "float(a/b) = " << float(a/b) << endl;
system("pause");
return 0;
}