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

Objective C: challenge 1 error

When I tried to complete the first challenge task in objective c, I ended up getting it wrong when I am certain that it was right. I even checked it on Xcode and it was correct. This is what i wrote:

include <stdio.h>

{

float radius = 14.5;


printf("The radius of a circle is %f cm.\n", radius);

return 0;

}

Please reply as soon as possible.

  • Brandon Vila

2 Answers

Hi Brandon, you almost had it.

float radius = 14.5;
printf("A ball with a radius of %f inches.", radius);
Ahmed Samy
PLUS
Ahmed Samy
Courses Plus Student 1,101 Points

Hello Braindon Villa u shouldn't add the printf statement at this point u should delete it then in the next challenge they will ask u to add this statement so it shoud look like that float radius = 14.5;