Do you remember prime factorisation trees?
36
9 4
3 3 2 2
Using the diagram, you can see that 3 is the largest prime factor of 36.
Your job is to create a program that outputs the largest prime factor of 40478. (BONUS: allow the user to input any number they wish while running the program)