{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CalculationsV4

CalculationsV4 - The Calculations class performs addition...

Info icon This preview shows pages 1–2. 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. * Student Name: HuiJie Liu Date: October 14, 2007 Assignment: 2.03 * ?LVS 2007 * @author Bill Jordan * @version 01/19/07 */ public class CalculationsV4 { 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"); System.out.print(iNum3 + " minus " + iNum4 + " equals "); System.out.println(iNum3 - iNum4); System.out.print(dNum3 + " minus " + dNum4 + " equals ");
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern