program ReverseNumber;
varnumber, reversedNumber, remainder: integer;
beginwriteln('Enter a three-digit natural number: ');readln(number);
reversedNumber := 0;
remainder := number mod 10;reversedNumber := reversedNumber + remainder * 100;number := number div 10;
remainder := number mod 10;reversedNumber := reversedNumber + remainder * 10;number := number div 10;
reversedNumber := reversedNumber + number;
writeln('Reversed number is: ', reversedNumber);end.
program ReverseNumber;
var
number, reversedNumber, remainder: integer;
begin
writeln('Enter a three-digit natural number: ');
readln(number);
reversedNumber := 0;
remainder := number mod 10;
reversedNumber := reversedNumber + remainder * 100;
number := number div 10;
remainder := number mod 10;
reversedNumber := reversedNumber + remainder * 10;
number := number div 10;
reversedNumber := reversedNumber + number;
writeln('Reversed number is: ', reversedNumber);
end.