Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJustice Santistevan
Courses Plus Student 66 PointsWhat does this text mean "more '%' conversions than data arguments"
I dont understand what I am doing wrong in this segment.
float radius = 14.5;
printf("A ball with a radius of %f inches");
1 Answer
Ricardo Hill-Henry
38,442 PointsAs you code currently stands, you haven't told the printf statement what float value you want to replace the %f with. So I believe your output would be exactly "A ball with a radius of %f inches." For example if I wanted to print my age on the screen as a float, I would do:
float age = 18.0;
printf("My age is %f", age);
The extra part I've added there is what you're missing. This tells the printf statement that I would like to take whatever value is currently stored in the variable age, and substitute into my string where %f is, to be printed out.
Justice Santistevan
Courses Plus Student 66 PointsJustice Santistevan
Courses Plus Student 66 PointsThank you I completely spaced that out.