Lógica, perguntado por cristianozanoni2018, 9 meses atrás

algoritmo em pascal que receba três números inteiros e apresenta uma mensagem com os valores em ordem crescente​

Soluções para a tarefa

Respondido por jplivrosng
0

Segue o cóigo abaixo onde foi efetuado sem o uso de arrays:

Program Comparar;

var

   x: integer;

   y: integer;

   z: integer;

begin

readln(x);

readln(y);

readln(z);

if x<y then

   if y<z then

       writeln(x,' ',y,' ',z);

if x<z then

   if z<y then

   writeln(x,' ',z,' ',y);

if y<x then

   if x<z then

       writeln(y,' ',x,' ',z);

if y<z then

   if z<x then

   writeln(y,' ',z,' ',x);

if z<y then

   if y<x then

       writeln(z,' ',y,' ',x);

if z<x then

   if x<y then

   writeln(z,' ',x,' ',y);

   

end.

Perguntas interessantes