I was working on a problem as we know we have byte data type, short, int & long data type how will we came to know if we take input from user that the entered number is in short range, long range or double?

A function will be used for taking input and "if check" would be performed to check the value. But how would we put value of hundreds of thousands to a int variable? as it gave compilation error at the beginning