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

More detail on challenge!

I need extra help on understanding how to create the float variable.

1 Answer

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Yoel,

So in order to create a variable we have to declare what type of variable we want. So the first thing we'll type out is float.

Then we give our variable a name. In the case of this code challenge, the name it wants us to give is "radius." So let's add that to the code, and now we have float radius.

Finally, we have to give our float variable a value. The challenge wants us to give the value of "14.5." So we say that we want our float variable named radius to equal 14.5, and we end up with this:

float radius = 14.5

I hope that clears some things up for you!

Thanks!

Thanks!