Browse Source

started on mathproblems

master
school 7 years ago
parent
commit
4f45151d9e
  1. 9
      files/MathProblems.java

9
files/MathProblems.java

@ -7,12 +7,15 @@ public class MathProblems
// zero for the divisor, an Exception will be thrown, both of which need to be caught
public void divide()
{
Scanner input = new Scanner(System.in);
try
{
System.out.print("Enter a: ");
int a = input.nextInt();
System.out.print("Enter b: ");
int b = input.nextInt();
}
catch( )
catch(InputMismatchException ime)
{
}

Loading…
Cancel
Save