c programming endless loop
===

I have this code to validate user input. Condition: value entered should be a zero or positive number only. no negative value and alphabetic characters are accepted..

Here is my code for this and its just keep on going...

    #include <stdio.h>
    
    main ()
    {
     int a, b, c, d;
    
    printf ("enter value for a:");
    do {
     b = 0 ;
    scanf ("%d", &a);
     if (!isdigit(a))
        {printf("Number must be numeric!:\n");
         b ++ ;
    }
     else if ( a < 0 )
       {printf ("number must be postive\n");
         b ++ ;}
    else
    printf("\neverything is goood\n");
    }
    while (b != 0);
    
    }

please help me out !