hey fellas im im having this error "expected declaration before "}" token" on line 33
im using code:blocks and when i try to fix that i return nothing on the output
for (int i = 2; i < a; i++)
{
if (a % i == 0)
returnfalse;
elsereturntrue;
}
So say I passed 9 into the function the first thing that happens is the if will have
if(9 % 2 == 0)
which is false, so it will execute the else and return true. 9 is not prime, so this function should not be returning true with 9 as an input. I have not looked at your fibonacci function yet. Hopefully there is nothing wrong with the fibonacci function.