Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: pagnor on Sep 3, 2017



Title: What is the value of donuts after the following code executes?int donuts = 10;if (donuts != 10) ...
Post by: pagnor on Sep 3, 2017
What is the value of donuts after the following code executes?

   int donuts = 10;
   
   if (donuts != 10)
       donuts = 0;
   else
       donuts += 2;

A) 10
B) 2
C) 0
D) 12


Title: Re: What is the value of donuts after the following code executes?int donuts = 10;if (donuts != 10) ...
Post by: ade9ja on Sep 3, 2017
Content hidden