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) Functional Programming in C Functions

Bryner Toma
Bryner Toma
25,541 Points

Stuck on this challenge.

Keeps on telling me to make sure my parameters are the correct type. I've got floats floating everything and I can't seem to get this question right. Any hints?

Bryner Toma
Bryner Toma
25,541 Points
float addTwo(float x, float y) {

    float sum = x + y;
    return sum;

}

float x = 1.11;
float y = 2.22;


printf("%f", addTwo(x, y)); 

1 Answer

Bryner Toma
Bryner Toma
25,541 Points

Got it! Just had to take out the "printf" and it worked.... sheesh.... -_-