I'm trying to make a program that will allow a user to decide whether or not to repeat the program at the end. My program asks for user input, and based on what planet they pick, data values will be added to the associated data file. I want the user to be able to choose whether they get prompted to enter another planet, or to end the program. I'm having trouble with my do/while loop to achieve this.
You declare c as a double and then try to use it as a character. Declare it correctly and it should be fine.
Also, you shouldn't have the "Do you want to continue?" part at the end of each if statement; instead put it after all of them, right before the loop ends. No need to repeat the code.