Category: 5. Programs on Numbers
-
Java program to check prime number
The number which is only divisible by itself and 1 is known as prime number, for example 7 is a prime number because it is only divisible by itself and 1.This program takes the number (entered by user) and then checks whether the input number is prime or not. The program then displays the result. If…
-
Program to display first 100 prime numbers
Program to display first n prime numbers Output: Program to display first 100 prime numbersTo display the first 100 prime numbers, you can either enter n value as 100 in the above program OR write a program like this: Output: