daily pastebin goal
23%
SHARE
TWEET

revers

NyanYoda Feb 14th, 2018 (edited) 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program revers;
  2.  function revers(ch:word):word;
  3.  begin
  4.   revers:=10*(revers +ch mod 10);
  5.   if ch>9 then
  6.    revers:= revers(ch div 10,new)
  7.   else revers:=new div 10;
  8. end;
  9.  var ch:integer;
  10.  begin
  11.   readln(ch);
  12.   writeln(revers(ch,0));
  13. end.
RAW Paste Data
Top