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

Issue with code for IOS Variable Challenge task 1

Hello, I seem to have a problem with the code i created for the Variable challenge part 1.it keeps failing me yet when i typed the code into xcode, it successfully builds the program with no issues....the code is

include <stdio.h>

int main() { float radius = 14.5; printf("%f radius\n", radius); return 0; }

Any help will be greatly appreciated...

Sean

Im sorry but the code has been put on 1 line for a reason

5 Answers

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

You don't need the main function. Just what's inside of it.

I just put everything inside the curvy brackets and still got no success......Obviously still doing it wrong!!!

Thankyou for your help Amit, i just figured out i only needed to actually enter the specific line of code relating to the value of the float variable....

Regards Sean

What was the specific line of code? I am having the same problem

float radius = 14.5;