Hi there,

Turn this:

// test if num is prime

if((num % prime)==0)

{

printf("%d ",prime); // print out factor

num = num / prime;

}

Into this (use a while loop to divide be the prime as OFTEN as possible)

// test if num is prime

while((num % prime)==0)

{

printf("%d ",prime); // print out factor

num = num / prime;

}

Turn this:

// test if num is prime

if((num % prime)==0)

{

printf("%d ",prime); // print out factor

num = num / prime;

}

Into this (use a while loop to divide be the prime as OFTEN as possible)

// test if num is prime

while((num % prime)==0)

{

printf("%d ",prime); // print out factor

num = num / prime;

}