• Lenguaje

    Pascal

  • Descripción

    Solicitar dos números e indicar cual es el mayor o si son iguales.

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

var a, b : real;
begin
    write ('Ingresa el valor de a: ');
    readln (a);
    write ('Ingresa el valor de b: ');
    readln (b);
    if a>b then
        begin
            writeln ('El mayor es a.');
        end;
    if a=b then
        begin
            writeln ('Son iguales.');
        end;
    if b>a then
        begin
            writeln ('El mayor es b.');
        end;
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.