Your problem is that the less than operator (this thing < ) compares numbers in the usual way you would expect, but compares strings lexicographically.
What this means is that for two strings it first compares the first characters, then the second and so on until one character is "larger" than the other (the ordering of characters is
this). Notice that the characters for '0', '1', and so forth up to '9' are in the order you would expect.
Basically your program looks at the strings "100" and "60" and checks if '1' is less than '6'. Since the character '1' is "less than" the character '6', the string "100" is deemed to be less than the string "60".
If you change your kg variable to an
int type, then
get will take the text your user inputs and convert it to a number if possible (there will be an error if the user input non-numerical characters). Then you can compare that to the number 60 (not the string "60") and < will perform the usual numerical comparison.