Engineering Full Stack Apps with Java and JavaScript
What will the following code snippet print?
int count = 0, sum = 0; do{ if(count % 3 == 0) continue; sum+=count; }while(count++ < 11); System.out.println(sum);
Select 1 option
A. 49 B. 48 C. 37 D. 36 E. 38
B
sum+=count; is not executed. Thus, the result is the summation of: 1 2 4 5 7 8 10 11
Logged in users see lesser ads and get more features.
If you want to solve the questions together with the experts and understand the concepts better, please contact us using the contact form or WhatsApp numbers. Selected people get to do that without any additional charges.