samplepro1 - { public static void main(String args) { int...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; i //Jeremy Debruce //Jan.12.2009 //Sample Program 1 public class samplepro1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { public static void main(String args) { int num,sum; num = 2; sum = 0; while(num <= 40) { sum = sum + num; num = num + 2; } System.out.println("The sum is => "+sum); } }...
View Full Document

This note was uploaded on 06/17/2011 for the course COMP 2302 taught by Professor Staff during the Spring '11 term at Kennesaw.

Ask a homework question - tutors are online