Saturday, February 19, 2011
Prime factors of a number in java
Java code to get the prime factors of give number
import java.io.*;
class Test {
public static void main(String[] args) throws IOException {
int num,i=1,j,k;
System.out.println("Enter the range:");
BufferedReader br=new BufferedReader(new InputStreamReader (System.in));
num=Integer.parseInt(br.readLine());
while(i<=num){
Labels:
Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment