--- In [email protected], "Oludayo Oguntoyinbo" <[EMAIL PROTECTED]> wrote:
>
>    printf("Enter the type of bread you want to make: \n");
>    scanf("%c", &type);

I would use fgets() to read in a line of input, then use sscanf() on
the line.

#include <stdio.h>

int main(void)
{
    char buf[100], type, size, baking_type;

    printf("type:\n");
    fgets(buf, sizeof buf, stdin);
    sscanf(buf, "%c", &type);

    printf("size:\n");
    fgets(buf, sizeof buf, stdin);
    sscanf(buf, "%c", &size);

    printf("baking type:\n");
    fgets(buf, sizeof buf, stdin);
    sscanf(buf, "%c", &baking_type);

John

Reply via email to