[ACCEPTED]-integer constant is too large for "long" type-dev-c++
Try an "ULL" suffix:
Your literal as typed has type
int which isn't 5 big enough to hold the value. Try
600851475143ULL as a 4 first fix.
Note even with that, your
for loop 3 will never terminate since an unsigned can 2 never be less than 0. Instead, use a
long long and 1
Must be a limitation of dev-c++ support 1 for long long datatype. It compiles fine on MS VC++ 2010.
More Related questions