Hi, having a problem with something I am trying to do in C. This is the code I have:
#define MAX 10
for(i=0; i < MAX;i++)
printf("Enter the make : \n");
printf("Enter the model : \n");
This keeps asking for a make and model for up to 10 times, however I want it so that you can input up to 10 times but can also quit before if needed. E.g. if you only want to put 3 records in then you can quit after entering the third record. I have been trying this using getchar() but just can't seem to get it to work.