Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Objective-C Basics (Retired) Fundamentals of C Variables

it says i didnt make a float when i did

I made a float but it says that I didnt!

variable_assignment.mm
{
int homework_sheets = 1,000,000;

float m_to_cm = 100;

char the_12345;

12345 = LOLIPOPS;

printf ("%d homework sheets. /n",homework_sheets);
printf ("%f m to cm ./n",m_to_cm);
printf ("I really like %c ./n",12345;

}

2 Answers

William Li
PLUS
William Li
Courses Plus Student 26,867 Points

It looks like that your codes are doing many things, but none of those are what the code challenge asks for.

Create a float variable named 'radius' with the value '14.5'. (Do not write the main function).


  • your code indeed has a float variable, but its name isn't radius, nor does it have the value of 14.5.
  • you do not need to wrap your codes around the {}.
float radius = 14.5;    // one line, that's all

ok