Brandon Defrancis 8 년 전
부모
커밋
aef3beccf9
2개의 변경된 파일14개의 추가작업 그리고 7개의 파일을 삭제
  1. 10
    3
      WriteLoops.java
  2. 4
    4
      package.bluej

+ 10
- 3
WriteLoops.java 파일 보기

@@ -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;

+ 4
- 4
package.bluej 파일 보기

@@ -7,16 +7,16 @@ dependency2.to=WriteIFs
7 7
 dependency2.type=UsesDependency
8 8
 editor.fx.0.height=722
9 9
 editor.fx.0.width=800
10
-editor.fx.0.x=320
11
-editor.fx.0.y=58
10
+editor.fx.0.x=436
11
+editor.fx.0.y=34
12 12
 objectbench.height=109
13 13
 objectbench.width=605
14 14
 package.divider.horizontal=0.6
15 15
 package.divider.vertical=0.8491547464239272
16 16
 package.editor.height=646
17 17
 package.editor.width=503
18
-package.editor.x=10
19
-package.editor.y=23
18
+package.editor.x=165
19
+package.editor.y=25
20 20
 package.frame.height=827
21 21
 package.frame.width=629
22 22
 package.numDependencies=2