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 trialWarren Schlick
1,335 Pointskeeps crashing
unable to complete task. When try to check work it will crash
5 Answers
kirkbyo
15,791 PointsOk so the challenge wants you to declare a float variable that is named radius and holds a value of 14.5 and from the code you posted you are writing way too much. Here is what the code should look like
float radius = 14.5;
Let me know, if you have any other question :)
Ozzie
kirkbyo
15,791 PointsCould I see you're code that you are trying to use.
Thanks,
Ozzie
Warren Schlick
1,335 Points{
int days_in_a_week = 7;
float cm_to_in = 2.54;
float radius = 14.5;
char the_w;
the_w ='w';
// insert code here...
printf("%d days in a week\n", days_in_a_week);
printf("%f cm per in.\n", cm_to_in);
printf("The %c is a cool hotel\n", the_w);
printf("%f is the radius\n", radius);
return 0;
}
THANKS!
kirkbyo
15,791 PointsHi Warren,
Is Xcode crashing? or are you unable to complete the code challenge? I ran the code that you posted in Xcode and I had no problems. Let me know where exactly you are having trouble. :)
Thanks,
Ozzie
Warren Schlick
1,335 PointsHi Ozzie,
Challenge task 1 of 2 Create a float variable named 'radius' with the value '14.5'. (Do not write the main function).
Code the Variables in their compiler online not in Xcode
Important: The code you write in each task should be added to the code written in the previous task.
variable_assignment.mm. I hope this makes sense.
Thanks,
Warren
Warren Schlick
1,335 PointsThank you very much. I am over thinking it.
Warren