scanf("d",&j); for(z=1;j>0;j--) z=z*j; printf(".0lf\n",z);
The integer limit is 2147483647. The value of 100! is far greater than this so you are getting a wrong answer. Try to come up with a different approach.
Have a look at this tutorial
z is double and 100! is stored in z