#39 SumOfInput zmalone97

Otwarty
zmalone chce scalić 1 commity/ów z zmalone/ZCW-SumOfInput-BlueJ:master do master
7 zmienionych plików z 48 dodań i 6 usunięć
  1. BIN
      Main.class
  2. 6
    0
      Main.ctxt
  3. 1
    0
      Main.java
  4. BIN
      SumOfInput.class
  5. 5
    0
      SumOfInput.ctxt
  6. 23
    0
      SumOfInput.java
  7. 13
    6
      package.bluej

BIN
Main.class Wyświetl plik


+ 6
- 0
Main.ctxt Wyświetl plik

@@ -0,0 +1,6 @@
1
+#BlueJ class context
2
+comment0.target=Main
3
+comment0.text=\n\ Created\ by\ iyasuwatts\ on\ 10/17/17.\n
4
+comment1.params=args
5
+comment1.target=void\ main(java.lang.String[])
6
+numComments=2

+ 1
- 0
Main.java Wyświetl plik

@@ -7,3 +7,4 @@ public class Main {
7 7
 
8 8
     }
9 9
 }
10
+  

BIN
SumOfInput.class Wyświetl plik


+ 5
- 0
SumOfInput.ctxt Wyświetl plik

@@ -0,0 +1,5 @@
1
+#BlueJ class context
2
+comment0.target=SumOfInput
3
+comment1.params=args
4
+comment1.target=void\ sumOfInput(java.lang.String[])
5
+numComments=2

+ 23
- 0
SumOfInput.java Wyświetl plik

@@ -0,0 +1,23 @@
1
+
2
+/**
3
+ * Write a description of class SumOfInput here.
4
+ *
5
+ * @author Zavon Malone
6
+ * @version 10/21/18
7
+ */
8
+import java.util.Scanner;
9
+public class SumOfInput
10
+{
11
+   public static void sumOfInput(String args[]){
12
+    int i, n, sum = 0;
13
+    Scanner num = new Scanner (System.in);
14
+    System.out.print("Enter number");
15
+    i = num.nextInt();
16
+    while(i>0){
17
+    n = i % 10;
18
+    sum = sum + n;
19
+    i = i / 10;
20
+    }
21
+    System.out.println("Number Sum "+sum);
22
+    }
23
+}

+ 13
- 6
package.bluej Wyświetl plik

@@ -9,12 +9,12 @@ package.divider.horizontal=0.6
9 9
 package.divider.vertical=0.6845018450184502
10 10
 package.editor.height=364
11 11
 package.editor.width=674
12
-package.editor.x=-816
13
-package.editor.y=445
12
+package.editor.x=1
13
+package.editor.y=82
14 14
 package.frame.height=600
15 15
 package.frame.width=800
16 16
 package.numDependencies=0
17
-package.numTargets=1
17
+package.numTargets=2
18 18
 package.showExtends=true
19 19
 package.showUses=true
20 20
 project.charset=UTF-8
@@ -24,9 +24,16 @@ readme.width=47
24 24
 readme.x=10
25 25
 readme.y=10
26 26
 target1.height=50
27
-target1.name=Main
27
+target1.name=SumOfInput
28 28
 target1.showInterface=false
29 29
 target1.type=ClassTarget
30
-target1.width=80
31
-target1.x=70
30
+target1.width=100
31
+target1.x=160
32 32
 target1.y=10
33
+target2.height=50
34
+target2.name=Main
35
+target2.showInterface=false
36
+target2.type=ClassTarget
37
+target2.width=80
38
+target2.x=70
39
+target2.y=10