Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
program xxx;
var n, c, d, e, k : integer;
begin
wtite ('введите 3-х значное число n =');
readln (n);
c : = n div 100;
d : = (n div 10) mod 10;
e : = n mod 10;
k: = 100*e + 10*d + c;
if n = k then write ('палиндром') else write('не палиндром')
end.
var
i: integer;
a: array[1..20] of integer;
function fn(x: integer): integer;
if x mod 10 = 4 then fn: =x div 2
else fn: =x;
end;
for i: =1 to 20 do
readln(a[i]);
a[i]: =fn(a[i]);
writeln(a[i]);
if x< 10 then x: =10
else
if x< 15 then x: = 16
else x: = 20
для обоих вариантов х=10, потому что дальше первой строчки оно не пойдет
Популярные вопросы