SHARE
TWEET

Untitled

a guest Jun 18th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.  
  3. num: vetor[1..3] de inteiro
  4. i, j, aux: inteiro
  5.  
  6. Inicio
  7.  
  8.  para i de 1 ate 3 passo 1 faca
  9.       escreva ("Informe um nĂºmero:")
  10.       leia (num[i])
  11.  fimpara
  12.  
  13.       para i de 1 ate 2 passo 1 faca
  14.            para j de i+1 ate 3 faca
  15.                 se (num[i] > num[j]) entao
  16.                    aux <- num[i]
  17.                    num[i] <- num[j]
  18.                    num[j] <- aux
  19.                 fimse
  20.            fimpara
  21.       fimpara
  22.  
  23.       para i de 1 ate 3 passo 1 faca
  24.            escreva (num[i])
  25.       fimpara
  26. Fimalgoritmo
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top