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 trialLucy H
210 Points%f entered incorrectly?
Hi this is silly since I'm only in Stage one, but I can't understand why this is incorrect when %f is to float and that is what I have entered.
float radius = 14.5;
printf("A ball with a radius of %f inches");
2 Answers
Chris Shaw
26,676 PointsHi Lucy,
You have a few issues with your formatter which are as follows:
- The task requires you start the formatter with A, you have The
- You have
/n
at the end of your string, instead you should have a space and inches - You're not passing the variable
radius
to yourprintf
declaration
printf("A ball with a radius of %f inches", radius);
Happy coding.
Lucy H
210 PointsOn jeez thanks. Very new at this.
Chris Shaw
26,676 PointsNo worries, please ask as many questions as you like as there's plenty of people waiting to assist with you.