Predict try/catch/finally output. The function: try { log try; if flag throw } catch { log catch } finally { log finally } then log after. Input is 0 (no throw) or 1 (throw). Print the logged lines.
Input: 0 or 1. Output: the log lines in order.
Your program reads from stdin and prints to stdout.
Example 1
Input: 0
Output: try finally after
Hints
Predict try/catch/finally output. The function: try { log try; if flag throw } catch { log catch } finally { log finally } then log after. Input is 0 (no throw) or 1 (throw). Print the logged lines.
Input: 0 or 1. Output: the log lines in order.
Your program reads from stdin and prints to stdout.
Example 1
Input: 0
Output: try finally after
Hints