Does this modulus operator function work for all integers?

Does the following modulus operator function work properly for all integers?

/*------------------------------------------------------------------------*/
/* This function return 0 or 1. */
/* */
int fives(int n)
{
// Declare objects.
int results;
// Compute result to return.
if((n%5)==0)
{
.return 1;
}
else
{
return 0;
}
}
/*------------------------------------------------------------------------*/

I haven't been able to find an integer it doesn't work for, but I just want to make sure.
The built-in integer type operators are defined for all built-in integer types.

Your function name and definition could be improved:

1
2
3
4
int is_multiple_of_five( int n )
  {
  return (n % 5) == 0;
  }

Hope this helps.
Topic archived. No new replies allowed.