English, asked by vbbb8, 11 months ago

Write a program to display the following series upto 10 terms:
4,7,10.........................................

Answers

Answered by Anonymous
1

import java.util.*;

public class Series

{

public static void main(String args[])

{

int c=3,m;

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

{

c=c*m+1;

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

}

}

}

Answered by Anonymous
1

import java.util.*;

public class Series

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int a=3,b;

//using for loop

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

{

a=a*b+1;

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

}

}

}

Similar questions