Problem6 - { 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.Scanner; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; import java.lang.String; i //Jeremy Debruce //Jan.14.2009 //Problem 6 pre test public class Problem6
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, inc, sum; num = 1; inc = 2; sum = 0; s while (num <= 55) { sum = sum + num; inc = inc + 1; num = num + inc; } 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