daily pastebin goal
96%
SHARE
TWEET

4_45

Gates_Bill Aug 27th, 2018 192 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. algoritmo "MeuPau"
  2. var
  3.    x : caracter
  4.    y,d : inteiro
  5. inicio
  6.  
  7.       escreva("Entre com um número inteiro : ")
  8.       leia(y)
  9.       d <- y
  10.       enquanto y > 0 faca
  11.                se (y%2) = 0 entao
  12.                   x <- "0" + x
  13.                senao
  14.                     x <- "1" + x
  15.                fimse
  16.                     y <- y \ 2
  17.       fimenquanto
  18.       escreval("A representação binária de", d, " é ", x)
  19. 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