pascal倒序输出

 1 program Project6;
 2 
 3 {$APPTYPE CONSOLE}
 4 
 5 uses
 6   SysUtils;
 7 
 8 var
 9   a,b,c,d:integer;
10 
11 
12 begin
13   { TODO -oUser -cConsole Main : Insert code here }
14   writeln('please input456');
15   a:=456 div 100;
16   b:=456 mod 100;
17   c:=b div 10;
18   d:=b mod 10;
19   writeln(d*100+c*10+a);
20   readln;
21   end.
原文地址:https://www.cnblogs.com/lanjianhappy/p/6322107.html