CJCoding With Joseph

Print the Exception Type Name

Read an integer and print Value: <n>. If parsing fails, catch the exception and print the name of its type using ex.GetType().Name (which prints exactly FormatException for bad input). Use top-level statements with try/catch.

Input 7 prints: Value: 7
Input bad prints: FormatException

Expected Output:

Value: 7
Topics:
Exceptions
๐Ÿ“ฅ Auto-Input:
7\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.