You have a few options that I can see...
You could make 'q' a number, such as -1.
You could make day a string and parse the string for a 'q'. If a 'q' is not found, then check each character in the string for a character between '0' and '9'. If they are characters between '0' and '9', then convert them into an int.
printf("Please enter the number of days: ");
week = day/7;
days = day % 7;
printf("%d weeks and %d days", week, days);
}while(day != -1);
You could also create a main prompt like this:
If they select 0, prompt them for the number of days. If they select 1, exit.
What would you like to do?
0.) Calculate days
Enter a number: