This is what I’m putting in for the challenge at the end of section 5.

#include <stdio.h>

float remainingAngle (float angleA, float angleB);

{<-----------------------------Right here though, XCode is giving me an error that says expected identifier or (
return = 180 - angleA - angleB;

int main(int argc, const char * argv[])
float angleA = 30.0;
float angleB = 60.0;
float angleC = remainingAngle (angleA, angleB);
printf(“The third angle is %.2f\n”, angleC);
return 0;

What am I doing wrong? I read through previous posts about the challenge question and will be working ahead and going back at a later time. I’m brand new to programming except a little basic I did 12+ years ago.

Thank you for your time!


The first line of your function definition has a semicolon at the end of it. Just delete it and you should be ok. That semicolon at the end makes the line a prototype. The book is not using prototypes at this point and without it Xcode may issue a warning telling you the prototype is missing. Ignore it for now.



Thanks, Mitch!