I need to accept a number from the user and print the sum. I want the object defined to accept the characters entered by the user to be of integer type only.
I do not want to check the type of the object after the value is entered. I would like a method by which the program doesn't even accept strings or other data types, only integers.