Okay so I have a project, im almooost done, i just lack a certain function.
If the user inputs a Student Number which already exists, i want my program to ask the user again for another number and display sumthing like "Student Number already exists. Try again"
void add_record(record x, FILE *fp)
printf("Student ID: "); scanf("%d", &x.idno);
printf("First Name: "); gets(x.Fname);
printf("Last Name; "); gets(x.Lname);
printf("Course: "); gets(x.course);
printf("Age: "); scanf("%d", &x.age);
printf("Tuition: "); scanf("%f", &x.tuition);
printf("Enter another record? Y/N");
I've tried working it out myself, but every time I input a Student Number , the program displays that it already exists, even though its not.
What do you suggest I do?? Pleassee i need help, the project is due tomorrow