So, I'm still new on coding, and my friend is kindly taught me a lot and I want to be learn it quick, then he gave me this exercise to study in my home
He gave me this question about booking table number, so I tried to make it..
But I'm having trouble with this part checking the table number if it is a digit or not... I was searching on google on how, but they only give example on how to do it with single character.. So, I made an account then ask here xD
btw, the table max number is 25.

```
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<ctype.h>

bool checkDigit(char tablenum){
    char digit[3];
    int n;
    int value = tablenum;
    if(tablenum>0 && tablenum<10)
        n=1;
    if(tablenum>9 && tablenum < 26)
        n=2;
    for(int i=0;i<n;i++){
        digit[i] = value%10;
        value /= 10;
    }
    if(n==1){
        printf("digit 0 = %d\nisdigit = %d\n",tablenum,isdigit(tablenum)); //just checking the isdigit value
        if(isdigit(digit[0])!=0){
            puts("It's digit");
            return true;
        }
        else{
            puts("It's not digit");
            return false;
        }
    }
    if(n==2){
        printf("digit 0 =  %d isdigit 0 = %d \ndigit 1 = %d isdigit 1 = %d\n",digit[0],isdigit(digit[0]),digit[1],isdigit(digit[1])); //checking the values too
        if(isdigit(digit[0]) != 0 && isdigit(digit[1]) != 0){
            puts("It's digits!");
            return true;
        }
        else{
            puts("It's not digits!");
            return false;
        }
    }
    else{
    printf("It's not digit!")
    return false;
    }
}

int main(){
    int num;
    bool itsdigit;
    do{
    scanf("%d",&num);fflush(stdin);

    itsdigit = checkDigit(num);

    }   while(itsdigit != 1 );
    getchar();
    return 0;
}

```

Input = "25" "1" "0" "test"

Output = "It's a digit" "It's a digit" "It's not a digit" "

Since the table is only 1 to 25

When I input "1" on it shows the right digit, but when it when in to isdigit() I keep getting 0.

I wonder what when wrong with this, and please give explanation.
And thanks before!