import java.util.*; /* * Program Title: Arithmetic Intro Lab * Bugs: None known * Description: This lab demonstrates the use of comments and * arithmetic operations. * * @author Dave Musicant * @author David Liben-Nowell (minor modifications) */ public class Arithmetic { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer (a whole number): "); Integer a = input.nextInt(); System.out.print("Enter another integer (a whole number): "); Integer b = input.nextInt(); System.out.println("a = " + a); // Here is another comment! System.out.println("b = " + b); System.out.println("a + b = " + (a+b)); System.out.println("a - b = " + (a-b)); System.out.println("a * b = " + (a*b)); System.out.println("a / b = " + (a/b)); System.out.println("a % b = " + (a%b)); System.out.println("a + b * b - b = " + (a + b * b - b)); // think about "order of operations" from third grade in // trying to figure out what this will output.. } }