Информатика Архивный вопрос

Помогите найти ошибку
дано 3 цифры распечатать все двухзначные числа
begin
program: adf;
begin
var a,b,c :=in tege;
begin
writeln ('write');
read (a,b,c);
writeln (a,b);
writeln (b,a);
writeln (a,c);
writeln (c,a);
writeln (b,c);
writeln (c,b);
end

3 комментария:
Тебе надо найти двухзначные числа?
Да а так же трехзначные
щас напишу для трехзначных

Ответы

Гость

Ты не правильно оформил код вот правильный ответ, НО ЭТО РАБОТАЕТ ТОЛЬКО ЕСЛИ ТЕБЕ НАДО НАЙТИ ДВУХЗНАЧНЫЕ ЧИСЛА ИЗ ТРЁХ ВВЕДЁННЫХ   
program qwe;var a, b, c : LongInt;beginread (a,b,c);if a div 100 = 0 then write (a,' ');if b div 100 = 0 then write (b,' ');if c div 100 = 0 then write (c,' ');end.


4 комментария:
program qwe;var a, b, c : LongInt;beginread (a,b,c);if c > 9 and c < 99 then write(a,' ')else if c > 9 and c < 99 then write (b,' ')else if c > 9 and c < 99 then write (c,' ')elseif a > 99 and a < 999 then write (a, ' ');if b > 99 and b < 999 then write (b, ' ');if c > 99 and c < 999 then write (c, ' ');end.
я хз почему, но там типы не подходят, хотя написано все правильно
Вот теперь всё работает, сперва выводит двухзначные, потом трёхзначные
program qwe;var a, b, c : LongInt;beginread (a,b,c);if (a > 9) and (a < 99) then write(a,' ');if (b > 9) and (b < 99) then write (b,' ');if (c > 9) and (c < 99) then write (c,' ');if (a > 99) and (a < 999) then write (a, ' ');if (b > 99) and (b < 999) then write (b, ' ');if (c > 99) and (c < 999) then write (c, ' ');end.

Похожие вопросы