why doesn´t ((num / i) % 1 == 0)
work in C++ when num is a double? and how would I instead write this code, that checks for factorials by checking if it leaves a remainder (etc 0.3333).
int getFactorials (double num)
{
int total = 0; // if (total / 2) is equal too 'num' it is a perfect number.
for (int i = 1; i < num; i++)
{
if ((num / i) % 1 == 0)
{
cout << i << endl;
}
}
return 0;
}