Questions tagged as 'while'

2
answers

Compile error [closed]

I just started AI and I do not get too much of it ... The idea was to use while to show us all even numbers up to 100 but it is always giving error and I have not been able to fix this yet. while (i <= 100) { i += 1; if (i % 2 =...
asked by 03.11.2016 / 16:27
1
answer

How to do an infinite count loop in Java?

I'm starting my studies with Java now and would like to know how to do an infinite count I'm having difficulties, since I know that in Python it would be something like: a = 0 while True: a = a + 1 print(a)     
asked by 19.11.2018 / 18:42