|
|
@@ -11,6 +11,7 @@ import java.util.function.Supplier;
|
|
11
|
11
|
* @version -0.3
|
|
12
|
12
|
*
|
|
13
|
13
|
*/
|
|
|
14
|
+//Hello Zipcode
|
|
14
|
15
|
public class WriteLoops {
|
|
15
|
16
|
|
|
16
|
17
|
private static final int _3 = 3;
|
|
|
@@ -73,7 +74,7 @@ public class WriteLoops {
|
|
73
|
74
|
|
|
74
|
75
|
// Write a FOR loop from 0 to 32 by 2s.
|
|
75
|
76
|
// calling
|
|
76
|
|
- for (int i = 32; i <=0; i+=2){
|
|
|
77
|
+ for (int i = 0; i < 32; i+=2){
|
|
77
|
78
|
w = w + 1;
|
|
78
|
79
|
}
|
|
79
|
80
|
// each time through the loop
|
|
|
@@ -245,10 +246,16 @@ public class WriteLoops {
|
|
245
|
246
|
// and if it is, add 7 to “i”
|
|
246
|
247
|
public int loop50by7() {
|
|
247
|
248
|
int w = 0;
|
|
248
|
|
-
|
|
|
249
|
+ int i = 7;
|
|
|
250
|
+
|
|
|
251
|
+ while ( i < 50 ) {
|
|
|
252
|
+ i += 7;
|
|
|
253
|
+
|
|
|
254
|
+ w = w + 1;
|
|
|
255
|
+ }
|
|
249
|
256
|
|
|
250
|
257
|
// calling
|
|
251
|
|
- w = w + 1;
|
|
|
258
|
+
|
|
252
|
259
|
// each time through the inner loop
|
|
253
|
260
|
|
|
254
|
261
|
return w;
|