import java.util.Scanner;
/** 
 *  This class will demonstrate problems with division operations in java
 *
 *  @author Nancy Harris
 *  @version V1 - 09/22/06
 */
public class Divide0
{
	/**
	 * main prompts for two values and performs various operations on those operands
	 *
	 * @param args unused in this program
	 */ 
	public static void main(String args[])
	{
		int 		operand1, operand2;
		int 		result;
		Scanner 	keyboard;
		
		keyboard = new Scanner(System.in);
		
		System.out.print("Enter two integers separated by a space: ");
		operand1 = keyboard.nextInt();
		operand2 = keyboard.nextInt();
		System.out.print("\n");
		
		result = operand1 + operand2;
		System.out.println(operand1 + " + " + operand2 + " = " + result);
		
		result = operand1 - operand2;
		System.out.println(operand1 + " - " + operand2 + " = " + result);
		
		result = operand1 * operand2;
		System.out.println(operand1 + " * " + operand2 + " = " + result);
		
		result = operand1 / operand2;
		System.out.println(operand1 + " / " + operand2 + " = " + result);
		
		result = operand1 % operand2;
		System.out.println(operand1 + " % " + operand2 + " = " + result);
	}	
}
		