calculates the total of the numbers 1-100
public class Summation { public static void main(String args[]) { int sum = 0;/*from w ww.j a va 2 s.c o m*/ for (int i = 1; i <= 100; i++) { sum += i; } System.out.println(sum); } }