Safe Division (Exception Handling)

EasyGrade 12

Read two integers a and b and print a / b. If b is 0, catch the resulting exception and print "Cannot divide by zero" instead of crashing.

Input / Output

Input: two integers "a b". Output: the integer division result, or "Cannot divide by zero".

Examples

Input

10 2

Expected Output

5

Input

10 0

Expected Output

Cannot divide by zero

+ 2 hidden tests checked on Submit.

Files

Main.java is the entry point. Add extra classes for OOP exercises — they compile together.

Main.java
Loading...

Run your code to see test results here.