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

Really new to this

What am I doing wrong? When I do it in Xcode it comes out fine. {

float radius = 14.5;

printf("%f is the Radius", radius);

return 0;

}

3 Answers

Judah Gutierrez
Judah Gutierrez
614 Points

I believe your print statement needs to be printf("%f is the Radius/n", radius);

You gotta remember to put the "/n"

Holger Liesegang
Holger Liesegang
50,595 Points

Hi Alex,

Challenge task 2 of 2 "Add a printf statement to print the radius variable. Here is what your output should look like: A ball with a radius of 14.5 inches." asks you to print the Text "A ball with a radius of 14.5 inches." You printed a slightly different text. The correct code would be:

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

thanks i actually was ahead of myself and was doing that for the first task. i finally did it on my ipad. when i did this on the computer the words did not turn green etc.. Is this common?

Holger Liesegang
Holger Liesegang
50,595 Points

What do you mean by "...the words did not turn green..."?