瀏覽代碼

updating the number utilities

Whitney Martinez 6 年之前
父節點
當前提交
72e3e79eac
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      NumberUtilities.java

+ 6
- 2
NumberUtilities.java 查看文件

@@ -43,14 +43,18 @@ public class NumberUtilities {
43 43
     
44 44
     public static String getEvenNumbers(int start, int stop) {
45 45
         String amount = "";
46
-        for
46
+        int j = 2 % stop;
47 47
         
48
+        for(int i = 0; start > stop; i+=j){
49
+           amount +=  i; 
50
+        }
51
+        return amount;
48 52
         
49 53
     }
50 54
 
51 55
 
52 56
     public static String getOddNumbers(int start, int stop) {
53
-        return null;
57
+        String amount ="";
54 58
     }
55 59
 
56 60