Sum of 10 numbers Display the sum of numbers from 1 to 10 line by line (there should be 10 lines):
1 1+2=3 1+2+3=6 1+2+3+4=10 ... Example output:
1 3 6 10 Here is a sample code, I do not know what to do next ...
public static void main(String[] args) { for(int a = 1; a <= 10; a++){ System.out.println(a); } } 