Showing your code would be more helpful than just the output.
pritaeas
Posting Prodigy
9,316 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,467
Skill Endorsements: 86
What should i do to handle this exception.
Don't cause it in the first place. If values can be null, be sure to check for null when doing things like output and use a safe alternative.
deceptikon
Challenge Accepted
3,460 posts since Jan 2012
Reputation Points: 822
Solved Threads: 474
Skill Endorsements: 57
On line 30, if you just tap return for a test with no answer you will get a null value from ReadLine, wich you are trying to convert to a char wich gives your error.
So test for null values( as deceptikon proposes) before you do the conversion to a char.
Maybe the simplest way is to use a dummy char ( a space, an 'X' etc.) for a test not answered.
ddanbe
Industrious Poster
4,307 posts since Oct 2008
Reputation Points: 2,126
Solved Threads: 725
Skill Endorsements: 26