123456789101112131415161718 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
- import java.util.*;
- public class Main {
-
- public static void main(String[] args){
- int sumOfNumbers = 0;
-
- Scanner in = new Scanner(System.in);
- System.out.print("Gimme number pls!\n");
- int n = in.nextInt();
- for (int i = 1; i <= n; i++) {
- sumOfNumbers += i;
- }
- System.out.println(sumOfNumbers);
- }
- }
|