|
@@ -1,9 +1,27 @@
|
1
|
1
|
/**
|
2
|
2
|
* Created by iyasuwatts on 10/17/17.
|
3
|
3
|
*/
|
|
4
|
+import java.util.Scanner;
|
4
|
5
|
public class Main {
|
5
|
6
|
|
6
|
7
|
public static void main(String[] args){
|
7
|
|
-
|
|
8
|
+
|
|
9
|
+ Scanner n = new Scanner(System.in);
|
|
10
|
+
|
|
11
|
+ int one = 1;
|
|
12
|
+
|
|
13
|
+ //get input
|
|
14
|
+ System.out.println("Enter a number: ");
|
|
15
|
+ int num = n.nextInt();
|
|
16
|
+
|
|
17
|
+ int count = 0;
|
|
18
|
+
|
|
19
|
+ for(int i = one; i < num; i++)
|
|
20
|
+ {
|
|
21
|
+ System.out.println("Numbers below yours: " + i);
|
|
22
|
+ count += i;
|
|
23
|
+
|
|
24
|
+ }
|
|
25
|
+ System.out.println("total " + count);
|
8
|
26
|
}
|
9
|
27
|
}
|