Saturday, February 19, 2011
Prime number program in java
Java program to check whether given number is prime number or not
import java.io.*;
class Test {
public static void main(String[] args) throws IOException {
int num,i,count=0;
System.out.println("Enter a number");
BufferedReader br=new BufferedReader(new InputStreamReader (System.in));
num=Integer.parseInt(br.readLine());
Labels:
Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment