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)

A prime number is a number that cannot be divided by any number other than 1 and itself (ie. 2, 17, 53, etc.). Find the sum of all prime numbers from 0 to 7600 (2 + 3 + 5 + 7 + 11 + 13... = ?).

This is where you can find new problems to solve with code. Feel free to post your unique solutions under threads or make your own problems for others to solve. Have fun, and don't forget to ask for help when you need it!

My personal solution in Java:

public static void main(String[] args) {

int sum = 0;

for(int i = 0; i <= 120; i++) {

if(i % 4 == 0 || i % 5 == 0) {

System.out.println(i);

sum += i;

}

}

System.out.println("Sum:\t" + sum);

}

BONUS

public static void main(String[] args) {

Scanner scan = new Scanner(

System.in);int sum = 0, min, max, fact1, fact2;

System.out.print("Enter the low end of the range:\t"); min = scan.nextInt();

System.out.print("Enter the high end of the range:\t"); max = scan.nextInt();

System.out.print("Enter one factor to find multiples of:\t"); fact1 = scan.nextInt();

System.out.print("Enter another factor to find multiples of:\t"); fact2 = scan.nextInt();

for(int i = min; i <= max; i++) {

if(i % fact1 == 0 || i % fact2 == 0) {

System.out.println(i);

sum += i;

}

}

System.out.println("Sum:\t" + sum);

}