I am trying to create a program in C to find the k'th continuing not free square numbers.
For example if k=3
it will print 48,49,50
.
However I'm constantly hitting this error:
[Error] invalid operands of types 'double' and 'double' to binary 'operator%'
The error is in this line: if (x % pow(j, 2)=0)
Here is my code:
#include <stdio.h>
#include <math.h>
#define K 6
int main()
{
int i,j,x;
while(i!=0)
{
for (x=4; x<=1000000000; x++)
for(j=2; j<=113; j++)
{
if (x % pow(j, 2)=0)
{
printf("%d",x);
}
}
}
}