Physics, asked by arre29, 9 months ago

write a program to display the following series upto 10 terms:
9,14,19...............................

Answers

Answered by Anonymous
10

import java.util.*;

public class Series

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int a=5,n=4,o,i;

//using for loop

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

{

o=a*i+n;

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

}

}

}

Answered by Anonymous
4

//using the utility system

import java.util.*;

public class Series

{

public static void main(String args[])

{

//since there is not any case of taking input so scanner class is not needed here

int a=5,m;

//as the program is repeating so using the for loop

for(m=2;m<=11;m++)

{

//mathematical representation

a=a*m-1;

//visualising the output

System.out.println("Display the series"+a);

}

}

}

Similar questions