CalculationsV2

CalculationsV2 - // Multiplication

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

View Full Document Right Arrow Icon
/** * The Calculations class performs addition, subtraction, multiplication, division, and modulus operations on integers and decimals. * * ?LVS 2007 * @author Bill Jordan * @version 01/19/07 */ public class CalculationsV2 { public static void main(String[] args) { // Addition System.out.println("Addition"); System.out.println(4 + 8); System.out.println(23.52 + 8.9325); //System.out.println(); // Subtraction System.out.println("Subtraction"); System.out.println(9 - 33); System.out.println(98.6 - 47.0038); //System.out.println();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // Multiplication System.out.println("Multiplication"); System.out.println(15 * 3 * 201); System.out.println(3.14 * 5.0 * 5.0); //System.out.println(); // Division System.out.println("Division"); System.out.println(48 / 8); System.out.println(212.0 / 32.0); //System.out.println(); // Modulus operator System.out.println("Modulus"); System.out.println(23 & 15); System.out.println(3298.7 % 243.1); //System.out.println(); }//end of main method }//end of class...
View Full Document

Ask a homework question - tutors are online