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

Mathew Thomas
Mathew Thomas
65 Points

what is the challenge looking for

i wrote:

float radius = 14.5;

do you want to see a printf etc.. { float radius = 14.5;

printf("%f the radius is"/n, radius; return = 0

2 Answers

You should only have two lines of code. You don't need the curly braces or the return statement. They only want you to print the radius with a certain output.

You passed the first task with float radius = 14.5;

In the second task they give you the output string that printf should produce.

A ball with a radius of 14.5 inches.

Your format string doesn't resemble that.

Mathew Thomas
Mathew Thomas
65 Points

thanks jason. I realized i needed to include the #include <stdio.h> first then the float radius = 14.5;

when they said not to include the main part i though that meant everything above main from the previous lesson

You're welcome.

Just to let you know, it does pass without the #include line. I didn't put it in myself.