The next problem was presented to me during a job interview when I started looking for work earlier.
Some time has passed and I just can't see the solution! It is a fact that I've been occupied ever since, but still it bites me not to know how to solve this problem.
Error at line 14...Code:#include <stdio.h>
#include <stdint.h>
int main(void)
{
int64_t c, r, x, y;
c = 0;
r = 968790360;
for (x = -r; x <= r; x++)
for (y = -r; y <= r; y++)
c += ((x * x) + (y * y) <= (r * r));
c = (c * 0x671659AD2B395A35LL) ^ 0x6A657B39259F7846LLU;
printf("%.8s\n", (char *) &c);
return 0;
}
Thanks