var max, c,t, count: integer; begin write('c = '); readln(c); t : = c; max : = t mod 10; while t < > 0 do begin if max < t mod 10 then max : = t mod 10; t : = t div 10; end; t : = c; count : = 0; while t < > 0 do begin if t mod 10 = max then count : = count + 1; t : = t div 10; end; writeln('count = ', count); readlnend.
var max, c,t, count: integer; begin write('c = '); readln(c); t : = c; max : = t mod 10; while t < > 0 do begin if max < t mod 10 then max : = t mod 10; t : = t div 10; end; t : = c; count : = 0; while t < > 0 do begin if t mod 10 = max then count : = count + 1; t : = t div 10; end; writeln('count = ', count); readlnend.
Поделитесь своими знаниями, ответьте на вопрос:
всего 15 бабушек
var i, summ, c: integer; begin i : = 1; c : = 555 - 12; summ : = 555; while summ < 7200 do begin summ : = summ + c; c : = c - 12; inc(i); end; writeln('summ = ', summ); writeln('n = ', i - 1); end.