# Pseudocode HELPPPP

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.

``````void prime_factorise(lli n , map<lli,lli> &mp){

while(n%2==0){
mp[2]++;
n/=2;
}
for(lli i=3;i*i<=n;i+=2){
while(n%i==0){
mp[i]++;
n/=i;
}
}

if(n>1) mp[n]++;
``````

}