// Sumation.java // Compute the sum of the first 100 integer values and print // the results. public class Summation { public static void main( String[] args ) { final int NUM_VALUES = 100; int summation = 0; int i = 0; while( i <= NUM_VALUES ) { summation = summation + 1; i = i + 1; } System.out.println( "The sum of the first " + NUM_VALUES + " integers is " + summation ); } }