/** * A program to illustrate a few arithmetic operators. * * Class Demo csc211 * Summer 2001 * Anthony Larrain */ class Calculator1{ public static void main( String [] args ) { int operand1, operand2, result; operand1 = 17; operand2 = 3; result = operand1 + operand2; System.out.println("The sum is... " + result); result = operand1 - operand2; System.out.println("The difference is... " + result); result = operand1 * operand2; System.out.println("The product is... " + result); result = operand1 / operand2; System.out.println("Their ratio is.. " + result); result = 17 % 3; System.out.print("When " + operand1 + " is divided by "); System.out.print(operand2 + " the remainder is " + result ); System.out.println(); } }