import java.util.Scanner;

/** 
 *  This class will demonstrate problems with bad input.
 *
 *  @author Nancy Harris
 *  @version V1 - 09/22/06
 */
public class BadInput
{
    /**
     * 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;
        int operand2;
        int result;
        String badValue;
        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);
    } 
}
