write a program to input two integers say x and n and find the sum of the following series:(given attached)plzz
Attachments:
ankitasaloafer:
m just searching ans for this... i will give u later..plzz give .(dot) cmment so that i can get notification..
Answers
Answered by
2
Lemme give the code in c++
(pre ANSI code)
#include<iostream.h>
#include<conio.h>
int fact(int);
int pow(int);
void main()
{
clrscr();
int n,i;
long int sum=0;
cout<<"Enter n";
cin>>n;
for(i=1;i<=n; i++)
sum+=pow(i)/fact(i);
cout<<"\nResult = "<<sum;
}
int pow(int x)
{
int res=1;
for(int a=1;a<=x; x++)
res*=x;
}
int fact(int y)
{
int res=1;
for(int b=1;b<=y;b++)
res*=b;
}
Answered by
1
hey dear!! here is yur ans...☺☺
hope this, helps u!!
hope this, helps u!!
Attachments:
Similar questions