Hi there, I have a pseudocode that I cannot seem to figure out. My assignment is to declare a the prime numbers from an interval and also print out the factorization of each number in the interval. I got the interval part down but I can’t get the prime factorization to print for each number.

This is the pseudocode for the prime factorization:

Set lower and upper, the lower and upper bounds of numbers to factorize.

For each i from lower to upper…

– Set current to i and start with a divisor of divisor = 2. Until divisor

exceeds i/2 or current equals 1…

∗ If divisor divides evenly into current, set current = current/divisor

and print divisor with an ‘x’ (or without an ‘x’ if current is 1).

∗ Otherwise, replace divisor by the smallest odd number bigger than

divisor.

– If divisor has exceeded i/2, the number is prime.