62 432
Assignments Done
99,4%
Successfully Done
In June 2018

Answer to Question #19077 in C++ for kshitij

Question #19077
write a program to print the sum of the following series : 1/1!+2/2!+3/3!+........N
Expert's answer
#include <iostream>
using namespace std;
int main (){
cout<<"ENter n\n";
int n;
cin>>n;

long long N = 1;
for (int i = 1 ; i <= n ; i++){
& N *= i;
}
cout<< n << '/' << n <<"! = "<<& 1 / double(N) << " = 1/"<<N<<endl;
system("pause");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions