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 trial

iOS Objective-C Basics (Retired) Fundamentals of C Variables

How do you get printf to make a ball 14.5"?

Did I miss the instructions on how to make a ball? I can get printf to print 14.5 as radius in Xcode but not a ball.

2 Answers

Robert Bojor
PLUS
Robert Bojor
Courses Plus Student 29,439 Points

Hi Johnny,

the challenge asks you to print out the text "A ball with a radius of 14.5 inches." and replace the 14.5 with the actual value of the radius float variable. Check the code below.

float radius = 14.5;
printf("A ball with a radius of %f inches.", radius);

I for some reason did not read it correctly.

Thanks