English, asked by vbbb8, 1 year ago

Write a program to display the series upto 10 terms:
15,28,41.....................................................

Answers

Answered by Anonymous
15

import java.util.*;

public class Series

{

public static void main(String args[])

{

int a=13, n;

for(n=1;n<=10;n++)

{

a=a*n+2;

System.out.println("The series is"+a);

}

}

}

Answered by Anonymous
14

import java.util.*;

public class Series

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int a=2,b=13,c;

//using for loop

for(c=1;c<=10;c++)

{

a=a+b;

System.out.println("The series is"+a);

}

}

}

Similar questions