Main.java 417B

123456789101112131415161718
  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. System.out.println("Please Enter Your Value");
  8. Scanner numberInput = new Scanner(System.in);
  9. long n = numberInput.nextInt();
  10. long finVal = 0;
  11. for(int i = 1; i <= n; i++){
  12. finVal += i;
  13. }
  14. System.out.println(finVal);
  15. }
  16. }