Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  largest prime factor
Language: JAVA
Code:
import java.util.*;
public class largestprime(){

public static void main(string args[]){
Arraylist m = new Arraylist();
long n;
for(long i=0;i<=n;i++){
if(n%i==0){
m.add(i);
n=n/i;
i=0;

}


}

System.out.println(m);

}


}          
Comments: