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 Basic Data Types and Variables Numerical Variables

Razvan Sandulescu
Razvan Sandulescu
341 Points

Why is not working?

float foodPrice=3.50; NSLog(@"foodPrice is: %f", foodPrice);

variable_assignment.mm
float foodPrice=3.50;
NSLog(@"foodPrice is: %f", foodPrice);  

3 Answers

Razvan Sandulescu
Razvan Sandulescu
341 Points

Why is not working?

float foodPrice=3.50; NSLog(@"foodPrice is: %f", foodPrice);

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You're almost there, but you've erased the first bit of code that you did in step 1. The challenges expect you to build on the code that you did in the previous step. Also, the NSLog is not needed nor required by the challenge. Give it another shot with these tips in mind! :sparkles:

Razvan Sandulescu
Razvan Sandulescu
341 Points

Thank you sooooooo much! Apreciate !!!