Main.java 344B

12345678910111213141516
  1. /**
  2. * Created by iyasuwatts on 10/17/17.
  3. */
  4. import java.util.*;
  5. public class Main {
  6. public static void main(String[] args){
  7. Scanner keyboard = new Scanner(System.in);
  8. int sum = 0;
  9. int n = keyboard.nextInt();
  10. for(int i=1; i<=n; i++){
  11. sum += i;
  12. }
  13. System.out.println(sum);
  14. }
  15. }