Quiz: Understanding the Loop
Which lines are responsible for making this loop repeat exactly once for each digit?
- Yes|No
int n = 365; - Yes|No
int sum = 0; - Yes|No
while (n > 0) - Yes|No
int digit = n % 10; - Yes|No
sum = sum + digit; - Yes|No
n = n / 10; - Yes|No
System.out.println(n);