
Anandis
5 год назад
В Паскале:Среди заданных трех положительных чисел определить количество трехзначных чисел.
ОТВЕТЫ

Houston Roger
Oct 24, 2020
var
answer, a, b, c: integer;
begin
Writeln('Введите три значения');
Readln(a, b, c);
if (a >= 100) and (a <= 999) then inc(answer);
if (b >= 100) and (b <= 999) then inc(answer);
if (c >= 100) and (c <= 999) then inc(answer);
Writeln('Количество трехзначных чисел равно ', answer);
end.
answer, a, b, c: integer;
begin
Writeln('Введите три значения');
Readln(a, b, c);
if (a >= 100) and (a <= 999) then inc(answer);
if (b >= 100) and (b <= 999) then inc(answer);
if (c >= 100) and (c <= 999) then inc(answer);
Writeln('Количество трехзначных чисел равно ', answer);
end.
136
Смежные вопросы: