printf("Type a key and press ENTER: \n");
char c = getchar();

switch(c)
{
    case 'y':
        printf("Yes!\n");
        break;
    case 'n':
        printf("No.\n");
        break;
    default:
        printf("Maybe?\n");
}