TOPIC

O que eu errei?

Samuca asked 3 years ago

x = int(input()) contador = 0 while True: x += 1 if x % 2 != 0: print(x) contador += 1 if contador == 6: break

Remember not post solutions. Your post may be reviewed by our moderators.

  • tmjunior replied 3 years ago

    um valor por linha, inclusive o X ser for o caso.

    Veja que você acrescenta 1 a X no início do while, isso faz com que caso digitado um valor impar ele vai adicionar 1 e não vai imprimir X.

    MOD