Write a program to find the following series upto n terms:
11,24,37......
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 subtractive result of 2 from the multiples of 13.
Such that,
(13×1)-2
=13-2
=11
(13×2)-2
=26-2
=24
(13×3)-2
=39-2
=37
And vice versa.
Similar questions