I have something like this down:
int f = 120; for(int ff = 1; ff <= f; ff++){ while (f % ff != 0){ }
Is there anything w
This code will give you the factors.
ArrayList arr = new ArrayList<>(); int x=48; int y=1; while(x!=1) { if(x%y==0) { x=x/y; arr.add(y); if(y==1) { y++; } } else { y+=1; } } System.out.println(arr);