i think my code is all correct but it does not work : i coded this to show me this:
1  + (1/2!) + (1/3!) + … + (1/n!)
if ( n < 10 )      



    #include <iostream>
    using namespace std;
    int main() {
	int n;
	float factn=1,m,sum;
	cout<<"enter n\n";
	cin>>n;
	if(n<10&&n>=0){
	do{
			factn=factn*n;
			m=1/factn;
			sum=sum+m;
			n--;
		}while(n>=1);
			cout<<sum;
	}
	else{
		cout<<"error!\n";
	}
	return 0;
	
    }



this code must show this: 
( n < 10 )      1  + (1/2!) + (1/3!) + … + (1/n!)
what is the problem?
it returns wrong values :(