sorting and the use of isdigit
i need help with checking if there's a number or a digit in an imput which is here the password
Code:
void fill_account(account *c)
{
int flag=0,i,sum;
printf("give the name of account to add");
scanf("%s",&c->name);
printf("give the password");
scanf("%s",&c->password);
printf("give previliges");
scanf("%s",&c->previleges);
/* while(sum == 0)
{
i = 0;
while (c->.password[i])
{
if (isdigit(c->password[i]))
sum++;
i++;
}
if(sum == 0)
{
printf("\n Warning!\nYou have entered no digits in your password, please make sure that you enter at least 1 digit\a\a\a\a\n");
printf("\nPlease enter the account Password: \n");
printf("\n");
scanf("%s", c->password);
}
*/}