[Solved] How to prompt the user to enter a integer within a certain amount of numbers


int input;

while (true){
    scanf("%d",&input);
    if (input>=1 && input<=10){
        // process with your input then use break to end the while loop
    }
    else{
        printf("Wrong input! try Again.");
        continue;
    }
}

1

solved How to prompt the user to enter a integer within a certain amount of numbers