#include <iostream>
usingnamespace std;
int main()
{
for (double a = 600851475143 / 2; a > 0; a--)
{
if (a % 2 == 0) //a is underlined red with the error
{
continue;
}
}
return 0;
}
The % operator works with all integer types so it will work with long int just fine. If long int is not big enough you could try long long int instead.