Please help with Challenge


#1

Ok, so, i’ve written code as follows;

#include <stdio.h>
float remainingAngle(float angleA, float angleB);
{
return 180 - (angleA + angleB);
}

int main(int argc, const char * argv[])
{

float angleA = 60.0;
float angleB = 30.0;
float angleC = remainingAngle(angleA, angleB);
printf("the remaining angle is %.2f\n", angleC);

return 0;

}

However, Xcode keeps highlighting my first { after then stdio.h and telling me "expected identifier or ‘(’, why is it doing this? I’ve tried multiple other codes and it gives this as well… confused!


#2

Leave out the semicolon between the declaration of the function and the first curly brace:

float remainingAngle(float angleA, float angleB) {


#3

lol that makes sense, thanks Aaron!