/**************************************************************************** NAME: L. Wear DATE: Feb 2, 2019 EXERCISE: JavaMath.java PURPOSE: To demonstrate the use of mathematical operators. ****************************************************************************/ import java.util.Scanner; public class JavaMath { public static void main (String args []) { Scanner in = new Scanner(System.in); // keyboard input int x = 0; // first numerical value int y = 0; //second numerical value String results = ""; // final output // get integers from user System.out.print("Please enter the first integer: "); x = in.nextInt(); System.out.print("Please enter the second integer: "); y = in.nextInt(); // print the results of addition // print the results of subtraction of both x-y and y-x // print the results of multiplication // print the results of division of x/y and y/x without casting // print the results of division of x/y and y/x with casting // print the results of modulus of x%y and y%x // use the increment operator to add 1 to x, print x // use the decrement operator to subtract 1 from y, print y // print the results of (x+y)%7-6*2+y/x*(x-4) } // main } // JavaMath