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

how am i suppose to start the float exactly and how do i name it?

it says create a float variable named 'radius' with the numbers 14.5 (do not add the main)

Float will be your datatype, your variable name is radius and the number you are assigning is the value. So for example if I was asked to create a float named bubbles and give it a value of 5.1 knowing that (dataType variableName = value;)

so that would become

float bubbles = 5.1;

1 Answer

Stone Preston
Stone Preston
42,016 Points

creating a primitive type variable generally looks like this:

dataType variableName = value;

the challenge tells you that the data type needs to be float, the variable name needs to be radius, and the value needs to be 14.5