ExceptionExample1

ExceptionExample1 - //Line 4...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
^ import java.util.*; i public class ExceptionExample1 { static Scanner console = new Scanner(System.in); public static void main(String[] args) { int dividend, divisor, quotient; //Line 1 System.out.print("Line 2: Enter the " + "dividend: "); //Line 2 dividend = console.nextInt(); //Line 3 System.out.println();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //Line 4 System.out.print("Line 5: Enter the " + "divisor: "); //Line 5 divisor = console.nextInt(); //Line 6 System.out.println(); //Line 7 quotient = dividend / divisor; //Line 8 System.out.println("Line 9: Quotient = " + quotient); //Line 9 } }...
View Full Document

Ask a homework question - tutors are online