Q
questions
Today when I build a program,the compiler tells me there is no
error,but when I run it ,it shows " 1.#INF00000",what's the
meaning??????The program is as follows:
#include<stdio.h>
int main()
{ int x,y;
int w=0;
long double z=0;
for(x=0;x<=10;x++)
{if(x==0)
{w=1;}
else
{for(y=1;y<=x;y++)
{w*=y;} }
z+=(float)1/w;}
printf("%.9Lf",z);
return 0;}
error,but when I run it ,it shows " 1.#INF00000",what's the
meaning??????The program is as follows:
#include<stdio.h>
int main()
{ int x,y;
int w=0;
long double z=0;
for(x=0;x<=10;x++)
{if(x==0)
{w=1;}
else
{for(y=1;y<=x;y++)
{w*=y;} }
z+=(float)1/w;}
printf("%.9Lf",z);
return 0;}