Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

get int from stdin

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 2,77 sec, absolute running time: 0,44 sec, absolute service time: 3,22 sec 
edit mode |  history
"xxyyzz" *** error:  not an integer
"123xyz" *** error: invalid trailing character(s) "xyz"
"123 xy" *** error: invalid trailing character(s) " xy"
"123.0" *** error: invalid trailing character(s) ".0"
"123 12" *** error: invalid trailing character(s) " 12"
"1234567890123" *** error: not within the range of int
"+-123" *** error:  not an integer

number == -123

"456h" *** error: invalid trailing character(s) "h"
unexpected eof on stdin. trying to recover
*** error: unable to recover from eof on stdin. returning zero.


    
                
λ
.NET NoSQL database for rapid development