Meaning of 1.#IO

  c++

I was writing a very simple program to find out the sum of the n/n! series but when I kept the final value of n as 100000 the program gave me a value of 1.#IO. Is this some runtime issue or something wrong with my code?
Here is the code:

#include <stdio.h>

double fac(int x){
    int fac = 1;
    for(int i = x; i > 0; i--){
        fac *= i;
    }
    return fac;
}

void main(){
    double sum = 0;
    for(int  i = 1 ; i<= 100000 ; i ++){
        sum += (i/fac(i));
    }
    printf("%.3lf",sum);
}

Source: Windows Questions C++

LEAVE A COMMENT