ShadoW
2013-12-31 09:37:49 UTC
int remainder (int x1, int x2);
And this is the implementation:
int remainder (int x1, int x2){
return(x1%x2);
}
And this is where the function call occurs:
int x1, x2, prod_rem;
printf ("\nEnter the first number followed by the second number:\n");
scanf ("%d%d", &x1, &x2);
prod_rem = remainder(x1, x2);
printf ("\nResult is %d", prod_rem);
The program is pretty big -- a whole calculator, around 350 lines or so... so the whole code is not needed I suppose.
When I try to compile and run it gives me the error:
"Conflicting types for 'remainder'"
I don't know where the conflict is happening, it looks perfectly compatible to me.
Is there something wrong with my code or is this a common issue or what exactly? How to fix it?
Thanks in advance for any answers.