WAP in java to find the sum of the series S=1/a+3²+a²+5²/a³+... upto n terms.
Answers
Answered by
0
Answer:
class Series
{
public void main(int a,int n)
{
int S;
for(int i =1;i <= n;i=i+2)
{
S = i/Math.pow(a,2);
}
System.out.println("Sum = " + S);
}
}
I hope you find it useful... If you have any query do comment, I will try to solve it...
Similar questions