program CheckNumber; var num, firstDigit, lastDigit: integer; begin write('Enter a three-digit number: '); readln(num);
if (num >= 100) and (num <= 999) then begin firstDigit := num div 100; lastDigit := num mod 10;
if firstDigit = lastDigit then writeln('Number is three-digit and first digit equals last digit.') else writeln('Number is three-digit but first digit does not equal last digit.');
end else writeln('Number is not three-digit.'); end.
program CheckNumber;
var
num, firstDigit, lastDigit: integer;
begin
write('Enter a three-digit number: ');
readln(num);
if (num >= 100) and (num <= 999) then
if firstDigit = lastDigit thenbegin
firstDigit := num div 100;
lastDigit := num mod 10;
writeln('Number is three-digit and first digit equals last digit.')
else
writeln('Number is three-digit but first digit does not equal last digit.');
end
else
writeln('Number is not three-digit.');
end.