Series part 1
Series part 1: solved Java program for ICSE Class 9 Computer Applications with complete BlueJ code, explanation and sample output.
1.
import java.io.*;
class series1
{
public static void main()
{
double num=0.5;
System.out.print(num);
for(int i=0;i<7;i++)
{
num+=5*Math.pow(10,i);
System.out.print(", "+num);
}
}
}<tbody>
o/p
0.5, 5.5, 55.5, 555.5, 5555.5, 55555.5, 555555.5, 5555555.5
</tbody>
2. Find the sum of the following series.
2-4+6-8+..........n
import java.io.*;
class series2
{
public static void main()throws IOException
{
BufferedReaderbr=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a number of ur choice");
int n=Integer.parseInt(br.readLine());
int count=1;
int sum=0;
for(int i=1;i<=n;i+=2)
{
if(count%2!=0)
{
sum+=i;
}
else
{
sum-=i;
}
count++;
System.out.println(sum);
}
}
}3. Find the sum of the series
1!+2!+3!+..........+n!
import java . io.*;
public class series3
{
public static void main() throws IOException
{
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a Number");
int n = Integer.parseInt (br.readLine());
int sum=0;
for(int i=1;i<=n;i++)
{
int fact =1;
for(int j=1;j<=i;j++)
{
fact*=j;
}
sum+=fact;
}
System.out.println(sum);
}
}Related Posts
Continue learning with these related articles

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.

Math Library Methods in Java for ICSE Class 9 (with Outputs)
ICSE Class 9 Computer Applications notes on the Java Math class: sqrt, cbrt, pow, abs, max, min, ceil, floor, round, rint and random, with return types, tricky negative-number outputs and Java expressions for formulas.