Heres a part of my code:
printf(\"\\nEnter amount of adult tickets:\");
scanf(\"%d\", &TktAdult);
while (TktAdult<0){
printf(\"\\n
// You can try this, Filter all except for the digital characters
int TktAdult;
char ch;
char str[10];
int i = 0;
printf("\nEnter amount of adult tickets:");
while ((ch = getchar()) != '\n')
{
// Filter all except for the digital characters
if(!isalpha(ch) && isalnum(ch))
str[i++] = ch;
}
str[i] = '\0';
TktAdult = atoi(str);
printf("Done [%d]\n", TktAdult);