1234567891011121314151617181920212223 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
- import java.util.*;
- public class Main {
-
- public static void main(String[] args){
-
- int x, y, sum = 1;
- Scanner sc = new Scanner(System.in);
- System.out.println("Input a number below!");
- x = sc.nextInt();
-
- for (y = 1; y <= x; y++){
- sum += y;
- }
-
- System.out.println("The sum is "+ sum);
-
-
- }
- }
|