I'm really not sure how to do the part about adding the numbers from 1 to the number provided. So far I have:

Scanner input= new Scanner (System.in); System.out.print("Enter an integer"); int x= input.nextInt(); int sum=1; while (x>=1){ sumt += x; x++; }

I feel like I was on the right track until the "sumt" part..