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

Paul Fernkopf
Paul Fernkopf
823 Points

Every answer in, still incorrect

I am new to TreeHouse, but I am really trying to figure this out. I have followed along and typed in ever possible answer I can think of. Yet it still says I am not correct. Why? // first answer

include <stdio.h>

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

// second answer: float the_radius = 14.5; printf("%f radius.\n", the_radius); return 0;


What am I doing wrong?

2 Answers

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

You are providing more than what is required. All you need is float the_radius = 14.5;

edit: noticed your variable name was the_radius when it should be radius.

Get rid of the int main and its associated curly braces. The question said not to create the main function declaration.

The question says to name your variable radius. If you name your variable the_radius, your answer will fail.

Make sure your printf statement is printing exactly what the question asks for.

The quizzes check to make sure that you're doing exactly what they're asking for. One misspelled variable or an extra letter or a missing period in a print statement will cause your answer to fail.