Read the number from the user and store it in orig_n
Code:
long n, orig_n;
printf("Enter a number to get its prime factorization:  ");scanf("%ld", &orig_n);
Calculate the absolute value of that
Code:
n = abs(orig_n);
Carry on with your program. Use orig_n for things like checking if the number entered was negative. Use n where you need the positive (absolute) value, i.e. when you want to check primality, find prime factors, etc.

Basically orig_n can be used to remember the original value the user entered, so you can print it back to the user, and check it for negative to list a -1 in the prime factors, even after you find the absolute value and store it in n.