Advertisement
estephane

Untitled

May 27th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. --[[
  2. -- quest 1
  3. repeat
  4.     print("Insira seu peso")
  5.     peso = io.read("*n")
  6.     print("Insira sua altura")
  7.     altura = io.read("*n")
  8.     IMC = (peso/(altura)^2)
  9.      if IMC<18.5 then
  10.         print("Abaixo do Peso")
  11.      end
  12.      if (IMC>=18.5) and (IMC<25) then
  13.         print("Peso Normal")
  14.     end
  15.     if (IMC>=25) and (IMC<=30) then
  16.         print("Acima do peso")
  17.     end
  18.     if IMC>30 then
  19.         print("Obeso")
  20.     end
  21. until ((peso~=0) and (altura~=0))
  22. ]]--
  23.  
  24.  
  25.  
  26. --[[
  27.  
  28. -- quest 2
  29.  
  30.  repeat
  31.     print("Digite um número")
  32.     numero = io.read ("*n")
  33.     numero2 = io.read ("*n")
  34.     soma = (numero + numero2)
  35.     multiplica = (numero * numero2)
  36. until ((soma > numero) and (multiplica > numero2))
  37. print (soma)
  38. print(multiplica)
  39.  
  40. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement