123456Program
123456Program

Reputation: 13

Working with scanf and floats in C

I want to scan a file for 001.120 float or 220.550 or 123.125 etc., and floats with three digits, and three decimal digits, how do I do this, like is it %03.3f?

Upvotes: 0

Views: 57

Answers (1)

David Schwartz
David Schwartz

Reputation: 182753

No, it's just %f. It doesn't need to know the specifics because it can deduce them.

Upvotes: 3

Related Questions