write a program in java to find the sum of the given series:
a) s= a2+a2/2+a2/3+....... +a2/10
Answers
Answered by
22
Answer:
Hope it helps plz like my answer and plz mark me as Brainliest
Explanation:
# a Java program
import java.util.*;
class Sum_series
{
public static void main (String args[])
{
Scanner sc=new Scanner (System.in());
double sum=0;
System.out.println("enter the value of n");
int n=sc.nextInt();
System.out.println("enter "+n+" numbers");
for(int i=1;i<=n;i ++)
{
a=sc.nextInt();
sum=sum+1.0/a;
}
System.out.println("sum of series="+sum);
}
}
Answered by
1
Answer:
Mark as Brainlist answer Pls
Attachments:
Similar questions
Hindi,
4 months ago
Physics,
9 months ago
Social Sciences,
9 months ago
Math,
1 year ago
Computer Science,
1 year ago