Write a program to find the series upto 10 terms:
9,18,27,......................................................
Answers
Answered by
12
import java.util.*;
public class Series
{
public static void main(String args[])
{
int n=9,p;
//using for loop
for(p=1;p<=10;p++)
{
n=n*p;
System.out.println("Display the series"+n);
}
}
}
Answered by
20
import java.util.*;
public class Series
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int a=9,b;
for(b=1;b<=10;b++)
{
a=a*b;
System.out.println("The series is"+a);
}
}
}
Similar questions