1234567891011121314151617181920212223242526 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
-
- import java.util.Scanner;
-
- public class Main {
-
- public static void main(String[] args){
-
- Scanner scanner = new Scanner(System.in);
-
- int userInput = scanner.nextInt();
- int answer = 0;
-
- for(int i = 1;i <= userInput; i++) {
- answer += i;
-
-
- }
-
- System.out.println(answer);
- }
-
- }
|