Float decimal restriction
#1

How can I put a restriction to set only one decimal to a float number.

If I enter: 100.2 to return 1 and if I enter: 100.22 to return an error.
Reply
#2

%.1f -> This will allow just 1 decimal.
Reply
#3

I can use it with sscanf ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)