Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Digite 5 alturas em cm")
- p1=io.read("*number")
- p2=io.read("*number")
- p3=io.read("*number")
- p4=io.read("*number")
- p5=io.read("*number")
- cont=1
- maior=p1
- if p2>maior then
- cont=cont+1
- maior=p2
- end
- if (p3>maior) then
- cont=cont+1
- maior=p3
- end
- if (p4>maior) then
- cont=cont+1
- maior=p4
- end
- if (p5>maior) then
- cont=cont+1
- maior=p5
- end
- print( "serão vistos:" .. cont .. " " .. "O maior será:" .. maior)
Advertisement
Add Comment
Please, Sign In to add comment