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
English,
4 months ago
India Languages,
4 months ago
Science,
4 months ago
Physics,
8 months ago
Social Sciences,
8 months ago
Math,
11 months ago
Computer Science,
11 months ago