Hi, I'm having a little trouble with a program I was assigned. Basically, the program has to ask for a number and produce a table that indicates the prime factorization of the number's absolute value.

For example, if the user enters the number 245, the program has to do:

Number is: 245

Sign is: +

Prime factorization of 245 is:

PRIME FACTOR | POWER

===========| =======

5 | 1

7 | 2

the professor gives us this pseudocode as a guide:

1.Repeat fork = 2,3,...,n

a. Determine ifkis prime

b.if(kis prime) then

1. Determine the maximum value ofdsuch thatk^dis a factor (divisor) of [i]n[/n]

2. if (d> 0) then

kis a prime factor ofn

dis the exponent

He says that's the hard pard of the proyect

Im not asking for a complete program, i just want ideas on how to calculate prime numbers, and,if possiblethe Prime Factor part of the table :/