Strange results if type 1 and then eter result is in 3 times why?
[This message has been edited by Peter Tran (edited February 21, 2001).]
posted 16 years ago
gul, When you press "1" and return, you're actually passing in three characters. The first is the number "1" followed by the carriage return (CR) and line feed (LF) which are 13 and 10 respectively. If you modified your code to print out the read int value, you'll see 49 10 13. The ASCII value for the number 1 is 49.