Q:

C - The loop doesn't continue

Why doesn't this loop continue after I enter the letter y into the char answer?
I thought getchar() would help but it doesn't seem like its doing anything.
#include <stdio.h>

int main(void)
{
    char answer = 'y';
    int num = 0;
    printf("Enter a number: \n");
    scanf("%d", &num);

    while(answer != 'n')
    {
        int mult = 1;
        int k = 1;
        while (k <= num)
        {
            mult *= k;
            k++;
        }
        printf("%d! = %d\n", num, mult);

        printf("Would you like to try another number? \n");
        printf("Enter: y for yes | n for no\n");
        getchar();
        scanf("%c", &answer);
    }       
}

A:

I have made few corrections in your program. 

It was difficult to understand what your program does. I have made your program more readable and modular by defining a separate re-usable function for factorial. 
It makes more sense to ask user again for the number if user has entered 'y'. So, I have moved required code.
I don't recommend mix use of scanf and getchar in the program. So, we can just use scanf for the program. The scanf() function removes whitespace automatically before trying to parse conversions other than characters. The character formats (primarily %c; also scan sets %[…] — and %n) are the exception; they don't remove whitespace.

Use " %c" with a leading blank to skip optional white space. Do not use a trailing blank in a scanf() format string.
Note that this still doesn't consume any trailing whitespace left in the input stream, not even to the end of a line, so beware of that if also using getchar() or fgets() on the same input stream. We're just getting scanf to skip over whitespace before conversions, like it does for %d and other non-character conversions.
#include <stdio.h>

unsigned long factorial(unsigned long num)
{
    unsigned long mult = 1;
    unsigned long k = 1;
    while (k <= num) {
        mult *= k;
        k++;
    }

    return mult;
}

int main(void)
{
    char answer = 'y';

    do {
        int num = 0;
        printf("Enter a number: \n");
        scanf(" %d", &num);

        unsigned long mult = factorial(num);
        printf("%d! = %lu\n", num, mult);

        printf("Would you like to try another number? \n");
        printf("Enter: y for yes | n for no\n");
        scanf(" %c", &answer);

    } while (answer != 'n');  

    return 0;   
}   

