Converting inputs into int types

Please see previous post, this has been asked before Covert String to Integer