I'm writing a simple C program to classfiy distances into certain ranges such as short long or medium I understand that C will cancel out numbers after the decimal point to store as an int. So that confuses me that why can't I type in a number such as 7.5 during scanf? as that will leads me to error.
Why can't it just read in as 7 into my scanf? Is it because a keystroke of "." simply couldnt be accepted in declaring an int variable? Why is it exactly?