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