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 Array

using the same float number?

When making arrays do they suppose to be the same float number that this video presents to us? If not, how do we know if our float number is accurate for example:

numbers_geeks_love[0] = 3.1415;

instead of using 3.1415 can I change it to a different float number? Like 2.6543 as a random number?

3 Answers

J.D. Sandifer
J.D. Sandifer
18,813 Points

The array challenges tell you which numbers to use, but pi isn't one of them. Are you asking about something else?

In the challenge, just assign the number it asks you to assign. 2.71828 is the first one, I think. If you're just following along with the video, then it doesn't matter what you use, but your output my look different if you use something else.

J.D. Sandifer
J.D. Sandifer
18,813 Points

Not if you're just trying things out on your own in Xcode or some other IDE. And the challenges ask for other, specific numbers - so not there either.

So it don't really matter if we use the one in the video ?