CJCoding With Joseph

The finally Block

Read two integers and print Result: <a / b>. Catch a DivideByZeroException and print Error. In every case, print Done from a finally block (it runs whether or not an exception occurred). Use top-level statements.

Input 8 then 4 prints:
Result: 2
Done

Input 8 then 0 prints:
Error
Done

Expected Output:

Result: 2
Done
Topics:
Exceptions
๐Ÿ“ฅ Auto-Input:
8\n4\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.