Printf() on following code may behave incorrectly on some machine (including mine).
printf("\n number of factor %d\n", sum);
fflush(stdout);
if(sum == 0)
{
printf("\n The number %d is prime", p);
}
The code first prints out the variable ``sum'', and if, the sum is zero then it prints out the number.
While first printf
prints correctly but second printf
statement doesn't print.
Am I missing something here?