{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CalculationsV5

# CalculationsV5 - The Calculations class performs addition...

This preview shows pages 1–2. Sign up to view the full content.

/** * The Calculations class performs addition, subtraction, multiplication, division, and modulus operations on integers and decimals. * Student Name: HuiJie Liu Date: October 14, 2007 Assignment: 2.03 * ?LVS 2007 * @author Bill Jordan * @version 01/19/07 */ public class CalculationsV5 { public static void main(String[] args) { int iNum1 = 4; int iNum2 = 8; int iNum3 = 9; int iNum4 = 33; int iNum5 = 15; int iNum6 = 3; int iNum7 = 201; int iNum8 = 48; int iNum9 = 23; double dNum1 = 23.51; double dNum2 = 8.9325; double dNum3 = 98.6; double dNum4 = 47.0038; double dNum5 = 3.14; double dNum6 = 5.0; double dNum7 = 212.0; double dNum8 = 32.0; double dNum9 = 3298.7; double dNum10 = 243.1; // Addition System.out.println("Addition"); System.out.print(iNum1 + " plus " + iNum2 + " equals "); System.out.println(iNum1 + iNum2); System.out.print(dNum1 + " plus " + dNum2 + " equals "); System.out.println(dNum1 + dNum2); System.out.println(); //System.out.println(); // Subtraction System.out.println("Subtraction");

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

CalculationsV5 - The Calculations class performs addition...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online