This is my program:
#include
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
double f = pow(123,17);
double c = fmod(f,3233) ;
cout<< f << endl;
cout << c << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
It works for smaller numbers (like if c = 8 mod 2 I will get 0), but if I have c = 123^17 mod 3233 I don't get 855 like I'm supposed to, I get 992. Any ideas why?
2007-08-01
16:40:58
·
4 answers
·
asked by
Galbadian
2
in
Computers & Internet
➔ Programming & Design