I stumbled on this function that calculates #'s that are perfect, how ever I do not understand why it works. any one care to explain?

```
int perfect(int num,int den)
{
int rem = num - ((num/den)*den);
if (rem==0)
return(den);
else
return(0);
}
```

Recommended Topics