Joined
Last Seen
0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #107.65K
1 Posted Topic
Firstly, I suggest always checking the [URL="http://geekycode.net/index.php/2011/04/05/console-development-poor-design-observed-en-masse/"]return value of scanf[/URL]. If you don't check the return value, and someone enters "gibberish" instead of "42", then you end up with garbage in your variable. You'd want to tell the user they entered incorrectly, wouldn't you? Same thing with your [URL="http://geekycode.net/index.php/2011/04/28/int-getchar-void/"]getchar return …
The End.
plebbeh