Write a program to find the following series upto n terms:
15,28,41....
Answers
Answered by
1
Answer:
import java.util.*;
public class Series
{
public static void main(String args[ ])
{
Scanner in=new Scanner (System. in);
int a=13,b,c,n;
System.out.println("Enter the value of n");
n=in.nextInt();
for(b=1;b<=n;b++)
{
c=(a*b)+2;
System.out.println("The series is ="+c);
}
}
}
Explanation:
In the given series it is the additive result of 2 with the multiples of 13.
Such that,
(13×1)+2
=13+2
=15
(13×2)+2
=26+2
=28
(13×3)+2
=39+2
=41
And vice versa.
Similar questions
India Languages,
5 months ago
Math,
5 months ago
Social Sciences,
5 months ago
Physics,
11 months ago
English,
11 months ago