• Lenguaje

    Pascal

  • Descripción

    Leer dos números enteros positivos y determinar si el último dígito de un número es igual al último dígito del otro.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
program IgualdadDeLosUltimosDigitos;
uses crt;

var a, b : integer;
begin
    write ('Ingresa el valor de a: ');
    readln (a);
    write ('Ingresa el valor de b: ');
    readln (b);
    if a mod 10=b mod 10 then
        begin
            writeln ('Los '#163'ltimos d'#161'gitos son iguales.');
        end
    else
        begin
            writeln ('Los '#163'ltimos d'#161'gitos son diferentes.');
        end;
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.