Write a program to find the following series upto n terms:
10,23,36....
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)-3;
System.out.println("The series is ="+c);
}
}
}
Explanation:
In the given series it is the subtractive result of 3 from the multiples of 13.
Such that,
(13×1)-3
=13-3
=10
(13×2)-3
=26-3
=23
(13×3)-3
=39-3
=36
And vice versa.
Similar questions
Math,
5 months ago
Social Sciences,
5 months ago
Psychology,
5 months ago
Computer Science,
10 months ago
Math,
10 months ago
Chemistry,
1 year ago
English,
1 year ago