Horje
calculate prime factors of a number java Code Example
calculate prime factors of a number java
public static void main(String[] args) {
   	int n=12;
    for(int i=2; i<=n; i++){ 
       while(n%i==0){
         n=n/i;
         System.out.println(i); //prints 2 2 3
       }
   }
}




Java

Related
android run background service on startup Code Example android run background service on startup Code Example
random number generator java with range Code Example random number generator java with range Code Example
remoce last character froma java string Code Example remoce last character froma java string Code Example
in place transpose in a matrix in java Code Example in place transpose in a matrix in java Code Example
border bottom android xml Code Example border bottom android xml Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8