A simple return and it does not work
Hey!
I've been enjoying this board as a guest for a while now...I thought this would be a good time to post.
Why on earth does this function not return what it should? Always 0, it always returns zero. It doesn't matter what number I put into skott_ar. I need help!! :)
Code:
int skott(double skott_ar)
{
double tal;
double tal2;
double tal3;
tal=fmod(skott_ar,4);
tal2=fmod(skott_ar,100);
tal3=fmod(skott_ar,400);
if (tal=0)
{
return 1;
} else{return 0;}
}
Thanks for your time...
Christopher