DEV Community

can you tell me what is the error in this code ?

Ameen Akbar on February 25, 2023

Collapse
 
rain_37 profile image
Rain

I can't test it now but you have to use %f for scan a float type.
%d is for int type, if you want use it change the type of variable mark.

Collapse
 
gilfewster profile image
Gil Fewster

Hi! I don’t code C, so I may be wrong, but my guess would be that the text input is being received as a string, and needs to be converted to a number before you can determine if it is less than 50.