194k views
2 votes
System.out.print((k%3) + " "); if ((k % 3) == 0) k = k + 2; else k++; } what is printed as a result of executing the code segment? question 21 options:

a. 0 2 1 0 2
b. 0 2 0 2 0 2
c. 0 1 2 1 2 1 2
d. 0 2 0 2 0 2 0
e. 0 2 1 0 2 1 0

User Dotjoe
by
7.8k points

1 Answer

2 votes
Either B or D. Your question is missing information.
User Bidisha Mukherjee
by
8.1k points