Write a program that prints the sum of the first ten positive integers, 1 + 2 + ... + 10.
Solution:
import static java.lang.System.out;
class P0102
{
public static void main(String[] args)
{
out.println(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10);
}
}