-
Lenguaje
Pascal
-
Descripción
Lee dos valores desde el teclado y determinar si están en orden creciente o decreciente.
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
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 OrdenDeDosValores;
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 ('Orden creciente');
end;
if a>b then
begin
writeln ('Orden decreciente');
end;
if a=b then
begin
writeln ('Son iguales');
end;
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
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 ('Orden creciente');
end;
if a>b then
begin
writeln ('Orden decreciente');
end;
if a=b then
begin
writeln ('Son iguales');
end;
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.