I tried creating a loop that would put a menu on the screen, let the user select something, and put the menu after the whateveryoucallthem runs, and keep doing this until the user selects to quit, at which point the loop should end and then the program. However, every time I don't select to quit the program, the loop printf's the menu twice before it prompts me to enter something. I haven't been able to find anything online that explains why this is happening or how to prevent it, and while experimenting I've made the thing a complete, pathetic mess without actually fixing the problem. For some reason while blindly experimenting I also added a simple "put in your number: _ This is your number: _" which causes the program to crash for some other unknown reason. I don't know what to do or what I should have done, and I'm sick of looking at it. Please help me.The reason for the stuff that never comes up is because it's an assignment for school, and everything I've made is just a small part of what I'm supposed to do.Code:#define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <string.h> #define SIZE 20 typedef struct{ char string1[SIZE]; int int1; int int2; double double1; double double2; }abc; int menu(int *checkquit); int main() { int testingvalue=1; printf("Hello. This program is for BLANK\n"); do { menu(&testingvalue); } while(testingvalue>0); printf("Goodbye.\n"); } int menu(int *checkquit) { int numberthingy=0; char menuselection; printf("A-Add an entry\nD-Delete an entry\nP-Print the entire catalog\n"); printf("S-Save the current catolog\nC-Clear the current catolog\nQ-Quit the program\nSelect an item from the menu"); scanf("%s", &menuselection); if (menuselection=='q') { printf("Youquit"); *checkquit=0; } else if (menuselection=='Q') { printf("Youquitagain"); *checkquit=0; } else { printf("Repeating program"); *checkquit=1; } printf("\nEnter a number:\n"); scanf("%d", &numberthingy); printf("This is your number: %d\n", numberthingy); return 0; }