Am getting this compiling error, but can't figure out why. Error message is commented.
float remainingAngle(float angleA, float angleB);
{ // 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", angleC);
return 0;
}
You have a semi-colon at the end of the first line.
Remove the semi-colon between the function declaration and the opening brace
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With