Answer:
Put a copy of statements 2 and 3 right after the first copy.
Counting Higher
The following fragment:
int count = 0; // statement 1 System.out.println( count ) ; // statement 2 count = count + 1; // statement 3 System.out.println( count ) ; // statement 4 count = count + 1; System.out.println( count ) ;
will print out
0 1 2
The statement count = count + 1
QUESTION 18:
What does the following assignment statement statement do:
sum = 2*sum ;
(What are the two steps, in order?)