Computer project
Computer project
CLASS IX SCIENCE
ROLL NO. 3
SUBJECT: COMPUTER APPLICATIONS
1
CONTENTS
Teache
r’s
Topic Page
Sl.N Signat
o ure
1. Acknowledgement
2. Introduction
3. System specification
4. Programming 1
5. Working of the program
6. Output
7. Programming 2
8. Working of the program
9. Output
10. Programming 3
11. Working of the Program
12. Output
13. Programming 4
14. Working of the program
15. Output
Programming 5
16.
17. Working of the program
18. Output
19. Programming 6
20. Working of the program
21. Output
22. Programming 7
2
23. Working of the program
24. Output
25. Programming 8
26. Working of the program
27. Output
28. Programming 9
29. Working of the program
30. Output
31. Programming 10
32. Working of the program
33. Programming 11
34. Working of the program
35. Output
36. Programming 12
37. Working of the program
38. Output
39. Programming 13
40. Working of the program
41. Output
42. Program 14
43. Working of the program
44. Output
45. Programming 15
46. Working of the program
47. Output
48. Programming 16
49. Working of the program
50. Output
3
51. Programming 17
52. Working of the program
53. Output
54. Programming 18
55. Working of the program
56. Output
57. Programming 19
58. Working of the program
59. Output
60. Programming 19
61. Working of the program
62. Output
63. Conclusion
64. Bibliography
4
ACKNOWLEDGEMENT
I would like to show my utmost thanks and gratitude to
our Principal Madam. I am also thankful towards our
Computer applications teacher, who have given me this
opportunity to do this project of various ICSE Java
programs of Class 9 , Session 2024-25. This project
really helped me to learn about different types of
programs and classes which helped me a lot to improve
my conceptual knowledge.
5
INTRODUCTION
I am presenting the project of ICSE Class 9 , Session
2024-25.
Java is a high-level, object-oriented programming
language developed by Sun Microsystems in 1995.
Known for its platform independence due to the Java
Virtual Machine (JVM), it enables “write once, run
anywhere” functionality. Java is widely used for building
web applications, mobile apps, and enterprise software.
It emphasizes portability, security, and robustness,
making it a popular choice for developers worldwide.
This project follows various java programs of ICSE Class
9 curriculum which contains different variables and
classes. The description of the program and the how
the program works is also given in the following project.
6
SYSTEM SPECIFICATION
Model: LG XNote series
Operating System: Windows 7 Home Premium (64-bit)
Processor: Intel Core i5-3210M (2.5 GHz, dual-core)
RAM: 4 GB DDR3 (expandable to 8 GB)
Storage: 500 GB HDD (7200 RPM)
Graphics: Intel HD Graphics 4000
Display: 14-inch LED-backlit LCD (1366 x 768)
Weight: Approximately 2.2 kg
7
PROGRAMMING
Source Code
Import java.util.Scanner;
System.out.println(“Enter 20 numbers:”);
For (int i = 0; i < 20; i++) {
Numbers[i] = sc.nextInt();
}
8
If (num % j == 0) {
System.out.print(j + “ “);
}
}
System.out.println();
}
}
}
Output
9
Enter 20 numbers:
12 15 18 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
95 100
Factors of 12: 1 2 3 4 6 12
Factors of 15: 1 3 5 15
Factors of 18: 1 2 3 6 9 18
...
Factors of 100: 1 2 4 5 10 20 25 50 100
Source Code
Import java.util.Scanner;
10
Double sqrt = Math.sqrt(num);
11
Output
Enter a number: 16
16 is a perfect square.
Source Code
Import java.util.Scanner;
System.out.println(“First “ + n + “ natural
numbers are:”);
For (int i = 1; i <= n; i++) {
12
System.out.print(i + “ “);
}
}
}
Output
13
Program 4: Display odd numbers of user’s
choice
Source Code
Import java.util.Scanner;
14
1. The program asks the user how many odd numbers
to display.
Output
Source Code
Import java.util.Scanner;
15
Public class EvenNumbers {
Public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
16
Output
Source Code
Import java.util.Scanner;
17
System.out.println(“Squares of the first “ + n + “
natural numbers are:”);
For (int i = 1; i <= n; i++) {
System.out.println(“Square of “ + i + “ = “ + (i *
i));
}
}
}
Output
18
Enter the number of natural numbers to display their
squares: 5
Squares of the first 5 natural numbers are:
Square of 1 = 1
Square of 2 = 4
Square of 3 = 9
Square of 4 = 16
Square of 5 = 25
Source Code
Import java.util.Scanner;
19
System.out.println(“Squares of the first “ + n + “
odd numbers are:”);
For (int i = 1, count = 0; count < n; i += 2, count+
+) {
System.out.println(“Square of “ + i + “ = “ + (i *
i));
}
}
}
Output
Source Code
Import java.util.Scanner;
21
System.out.println(“Squares of the first “ + n + “
even numbers are:”);
For (int i = 2, count = 0; count < n; i += 2, count+
+) {
System.out.println(“Square of “ + i + “ = “ + (i *
i));
}
}
}
Output
Source Code
Import java.util.Scanner;
23
For (int i = 1; i <= n; i++) {
System.out.println(“Cube of “ + i + “ = “ + (i * i
* i));
}
}
}
Output
Source Code
Import java.util.Scanner;
Output
Source Code
Import java.util.Scanner;
Output
28
Cube of 10 = 1000
Source Code
Import java.util.Scanner;
29
If (sum == originalNum) {
System.out.println(originalNum + “ is an
Armstrong number.”);
} else {
System.out.println(originalNum + “ is not an
Armstrong number.”);
}
}
}
Output
30
Enter a number: 153
153 is an Armstrong number.
Source Code
Import java.util.Scanner;
31
}
Output
32
Program 14: Display the sum of the series
of even numbers of user’s choice
Source Code
Import java.util.Scanner;
33
Working of the Program
Output
Source Code
Import java.util.Scanner;
34
Public class ProductOfOddNumbers {
Public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Source Code
Import java.util.Scanner;
Output
37
Program 17: Display the series –
11111
22222
33333
44444
55555
Source Code
38
}
Output
11111
22222
33333
44444
55555
39
Program18: Display the series –
*
**
***
****
*****
Source Code
40
1. The outer loop controls the number of rows (from 1
to 5).
Output
**
***
****
*****
41
Program 19: Input any numbers and display
the greatest common divisor (GCD)
Source Code
Import java.util.Scanner;
Int gcd = 1;
For (int i = 1; i <= Math.min(num1, num2); i++) {
If (num1 % i == 0 && num2 % i == 0) {
Gcd = i;
}
}
42
System.out.println(“The GCD of “ + num1 + “ and “
+ num2 + “ is: “ + gcd);
}
}
Output
43
Program 20: Display all the Buzz Numbers
between p and q (where p < q)
Source Code
Import java.util.Scanner;
Output
45
14
17
21
27
28
35
42
47
49
46
47
CONCLUSION
In conclusion, the Java program efficiently calculates and
displays various computational tasks, including prime numbers,
factorials, and discounts for different product categories. It
demonstrates effective use of control structures, input
handling, and mathematical computations, showcasing Java's
versatility and utility in practical programming scenarios.
With Regards
Karanveer Singh
48
BIBLIOGRAPHY
The sources I have used to do this project :-
Chat GPT
ICSE UNDERSTANDING COMPUTER APPLICATIONS CLASS
9
JAVA ESSENTIALS FOR ICSE CLASS X
S’CHANDS ICSE COMPUTER APPLICATIONS
49
Thank you
50