lab2-1 - myCurrentAge = 21; thisYear = 2007;...

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

View Full Document Right Arrow Icon
// Lab 2-1 // This program calculates your age in the year 2010. // Input: None. // Output: Your current age followed by your age in 2010. public class MyAge { public static void main(String args[]) { // Declare and initialize your variables here. int myCurrentAge, thisYear, myCalculatedAge;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: myCurrentAge = 21; thisYear = 2007; myCalculatedAge = myCurrentAge + (2010 - thisYear); System.out.println("My Current Age is " + myCurrentAge); System.out.println("I will be " + myCalculatedAge + " in 2010."); System.exit(0); } }...
View Full Document

This note was uploaded on 04/30/2008 for the course MNGT 3040 taught by Professor Landrum during the Fall '08 term at Auburn University.

Ask a homework question - tutors are online