Java Reference
In-Depth Information
18.
+----+
\ /
/ \
\ /
/ \
\ /
/ \
+----+
19. How many lines
How many lines
How many lines
are printed?
20. T-minus 5, 4, 3, 2, 1, Blastoff!
21. 1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
22.
*
***
*****
*******
*********
***********
*************
***************
*****************
*******************
23. ****!****!****!
****!****!****!
24. ************!
************!
25. *!*!*!*!
*!*!*!*!
*!*!*!*!
*!*!*!*!
*!*!*!*!
*!*!*!*!
26.
The loop prints every third number, not every odd number. The statement count
= count + 2 on line 8 should be moved into the loop header instead of count++ .
Search WWH ::




Custom Search