program ReverseNumber;
varnum, reverseNum: integer;
beginwriteln('Enter a five-digit natural number: ');readln(num);
reverseNum := 0;
reverseNum := reverseNum + (num mod 10) * 10000;num := num div 10;
reverseNum := reverseNum + (num mod 10) * 1000;num := num div 10;
reverseNum := reverseNum + (num mod 10) * 100;num := num div 10;
reverseNum := reverseNum + (num mod 10) * 10;num := num div 10;
reverseNum := reverseNum + (num mod 10);
writeln('Reverse number is: ', reverseNum);
end.
program ReverseNumber;
var
num, reverseNum: integer;
begin
writeln('Enter a five-digit natural number: ');
readln(num);
reverseNum := 0;
reverseNum := reverseNum + (num mod 10) * 10000;
num := num div 10;
reverseNum := reverseNum + (num mod 10) * 1000;
num := num div 10;
reverseNum := reverseNum + (num mod 10) * 100;
num := num div 10;
reverseNum := reverseNum + (num mod 10) * 10;
num := num div 10;
reverseNum := reverseNum + (num mod 10);
writeln('Reverse number is: ', reverseNum);
end.