trouble with printf command

What is wrong with this?

1
2
w = w/1000000;
printf("Your windmill generated " %3.1lf " watts today!", w);

trying to make it to where only 1 decimal point is shown
Last edited on
the second "1" is a "l" not a "1"
its giving me an error on that.
Last edited on
printf("Your windmill generated %3.1lf watts today!", w);
its giving me more errors now
I am still having problem, please help. I'm stressing out here.
I just moved your " " cause they were out of place. Only 1 decimal point? Try %.1f
what do you mean by out of place?
Topic archived. No new replies allowed.