Let us see the java program to find the prime number. so first we should know about prime number. and logic to write a program, get to know about them below. Content. What is prime number. Logic for program. Program. Explanation. Output. What is prime number? Prime number is the number which can divide by 1 and itself only. Example: 2,3,5,7,11... Logic for the Program. We need to give limits to start and end the prime number. Then make the number between the limits divide each other, if the reminder is a zero then it is prime number. if we get any number other then zero it is not a prime number it does of come in sequence. we use for loop and if statement. Program import java.io.*; class prime { public static void main(String ar...
Educate your self.. Make each day your masterpiece.