Computer Science, asked by Ishu8364, 1 year ago

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..
Ishu8364: ok

Answers

Answered by maheshwaranlupp0yaxy
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;

}


Ishu8364: Can solve it in java ?
maheshwaranlupp0yaxy: The logic remains the same..... Just change the syntax
Answered by ankitasaloafer
1
hey dear!! here is yur ans...☺☺

hope this, helps u!!
Attachments:

ankitasaloafer: thnq..so mch☺☺❤❤
Ishu8364: u r mst wlcm!!;)
Similar questions