public class Sum1 { public static void main(String[] args) { int sum = 0; for (int i = 1; i <= 10; i = i + 1) { sum = sum + i; //sum += i; } System.out.println("The sum of the numbers from 1 to 10 is " + sum + "."); } }