DEV Community

Ameen Akbar
Ameen Akbar

Posted on

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

Image description
Image description

Top comments (2)

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.