So I'm adding an extra menu to my program and one of the printf statements decides to double print its output, something I have never seen before. I tried changing around some of the variable names, but none of that helped. If I changed it to some random output i.e. "asdghagkgklshklgh" it did not double print. Everything is in the string quotes so I'm not sure whats going on. Any help would be awesome.
Code:void SetupMenu(){ int DISTMOON, FUEL, NEWFFALL; char READY; float VELOCITY; printf("* * * * * * * Setup Menu * * * * * * * * *\n\n"); printf("Allows user to change Moon lander initial\n"); printf("values for a whole new experience !!!\n\n"); printf("* * * * * * * * * * * * * * * * * * * * * *\n\n"); READY = 'N'; while (!(READY == 'Y')){ do { printf("Enter new distance to Moon: >>"); scanf("%d", &DISTMOON); } while (DISTMOON <= 0); do { printf("Enter new amount of fuel: >>"); scanf("%d", &FUEL); } while (FUEL <= 0); printf("Enter new velocity of ship: >>"); scanf("%f", &VELOCITY); do { printf("Enter new Moon gravity: >>"); scanf("%d", &NEWFFALL); } while (FFALL <= 0); do { printf("Ready (Y/N)? >>"); scanf("%c", &READY); } while ((READY != 'Y') && (READY != 'N')); } return; }