what is the problem here? scanf doesnt seems to working in while loop. i was trying to find out vowel & consonent until user wants.
Here's the code:
#include <stdio.h>
main()
{
    char x,c;
    do
    {
        printf("enter\n");
        scanf("%c",&x);
        if(x=='a'||x=='e'||x=='i'||x=='o'||x=='u')
            printf("vowel\n");
        else
            printf("consonent\n");
        printf("do u want to continue ?(y/n)\n");
        scanf("%d",&c);
        if(c=='n')
            printf("thnks\n");
    } while(c=='y');
    return 0;
}
 
     
     
     
     
     
     
     
    