Shiyan12

Untitled

May 17th, 2021
553
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var x, a, b, c, res: integer;
  2. begin
  3.   readln(x);
  4.   if x mod 2 = 0 then
  5.     res := 2 * x
  6.   else begin
  7.     c := x mod 10;
  8.     b := (x div 10) mod 10;
  9.     a := x div 100;
  10.     res := c * 100 + b * 10 + a;
  11.   end;
  12.   writeln(res);
  13. end.
RAW Paste Data