Now i want to check that if value
int a = pow(9.0,100);
int b = 81;
int c = 547;
when i use a - b, the value should be can divide by c without remainder;
if( (a-b) % 547 == 0 )
cout << "Correct" << endl;
else
cout << "Wrong" << endl;
but the output always go wrong and i see website links. the answer should be correct. Link can be reference to thread here : How to calculate modulus of large numbers?
but mine one when do the congruence modulo it's involve minus sign. so dont know how to write the algorithm