Program z4_52;
uses crt;
var x: integer;
a, b, c : Byte;
Begin
clrscr;
write('Введите трёхзначное число:');
ReadLn(x);
If (x<100) Or (x>999) then writeln('Ошибка')
Else Begin
a:= x Div 100;
b:= x Div 10 Mod 10;
c:= x Mod 10;
If (a=b) and (b=c) or (b=0) and (c=0)
then writeln('Одно число')
else if (b=0) or (c=0) then
if (a<>b) and (a<>c)
then writeln('Четыре числа')
else writeln('Два числа')
else if (a=b) or (b=c) or (a=c)
then writeln ('Три числа')
Else writeln('Шесть чисел');
end;
readln; END.