## 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.

the challenge task says; "Q: 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."

the float is: float radius = 14.5 ;

i'm having problems with finding the proper answer. i came up with this;

please tell me where i was wrong and what the right answer is. thank you.

James Paulson

Hey James, you should have this so far.

```float radius = 14.5f;
```

dustin matlock, thank you. i have been trying at this for the last two days. you have made it look so simple.

This works but I don't see how it is correct. This outputs 14.5 A ball with a radius of 14.5 inches.

I think it should be:

```float radius = 14.5;
```

Rather than have the 14.5 hard coded into the output, the challenge wants you to use the variable instead.

Why does Dustin's version work. Following the video I would have thought it to be as Jason wrote it:

I tried Jason's version for ages but when i tried Dustin's the code checked out as correct. How come this is the case? Would someone please explain?

Thank you.

Hi Andrew,

I'm not sure if you are saying you could not get the code I posted to pass but it may have been a challenge glitch for you. I just tried again to make sure and it does pass.

As far as why the other one passes, some challenges aren't as rigorous in checking the output and sometimes incorrect answers sneak by.

The challenge does correctly catch this one:

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

You get an error here about it being the correct string but not the correct format. This produces the correct output but doesn't make use of the radius variable.

Great. Thank you Jason. The code i was entering and failing with was as yours but with the (...inches.\n", raidus); Maybe that was the reason? I passed the challenge but I just wanted to make sure I wasn't missing something. Thanks again.

You have a typo on `radius`

Was that in your code too or just that way here?

It could be both the period and the `\n`. I never tried that but I think others have passed with just the `\n`

It may even pass with `...inches` No line return or period at the end.

Yeah the radius was a typo on here - i checked it a million times on there. As a budding dyslexic you can never be to careful! Thanks for your help though boss. Much appreciated.

dustin matlock, thank you. i have been trying at this for the last two days. you have made it look so simple.