Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Pavan Kotti

Computer Science
Mr. Parker
Chapter 5 Book Problems
HW: p367 1-10 (pick problems that are challenging for you, spend 30-45 minutes)
1. The while loop
1.1. 10 (100/10)
1.1.1. 1 11 21 31 41 51 61 71 81 91
1.2. Zero (If the number is 10 and the max is ten the loop cant run )
1.3. Infinity (the condition given will never be met so it will run forever)
1.4. 7
1.4.1. 2 4 8 16 32 63 128
1.5. dab
1.6. 5
1.6.1. 10
1.6.2. 5
1.6.3. 3
2.
2.1. while(n<=max,n++){system.out.println(n);}
2.2. int total; = 25;
while(total<=total -number,number++){system.out.println(total = “ ”+ number);}
2.3. while(h<=max,n++)
int =2;
int red = 45;
ont ;
{system.out.println(n);}

3.
3.1. Mystery(1): 1 0
3.2. Mystery(6): 4 2
3.3. Mystery(19): 16 4
3.4. Mystery(39): 32 5
3.5. Mystery(74): 64 6
4.
4.1. Mystery(19): 19 0
4.2. Mystery(42): 21 1
4.3. Mystery(48): 3 4
4.4. Mystery(40): 5 6
4.5. Mystery(64): 1 2

You might also like