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 trialPreston Harris
1,607 PointsiOS development Variables Challenge help
So it tells me to create a float variable called radius that equals to 14.5, so i did and i passed.
float radius = 14.5;
Ok, so then it tells me to use a printf statement and use the variable in it.
printf("A ball with a radius of %f inches./n, radius");
I keep on failing it and i can't get pass this point, can someone tell me what i am doing wrong.
2 Answers
Stone Preston
42,016 Pointsyou need to close the quotes after the string, not after the variable name
float radius = 14.5;
printf("A ball with a radius of %f inches./n", radius );
Preston Harris
1,607 PointsThanks!