Ok, this is kinda embarassing but im having trouble with the beginning of my code. i need help quickly to get this project done. The code is supposed to display the options below, (1-5) and then scan for user input. instead my program is just endless loooping without scanning. any help? i think a new persepctive is all i need.
ive posted the problem bit below.
Code:int main () { flowratetable.name==NULL; userinterface(); } void userinterface(){ int quit=0, exit=0; int option=0; while (quit==0){ printf("\t1. Create a flow rate table\n\t2. Load an existing flow rate table\n\t3. Display currenty loaded flow rate table\n\t4. Estimate water depth using flow rate table\n\t5. Terminate\n\n"); if (flowratetable.name != NULL ){ printf("Table %s Loaded", flowratetable.name); } else if (flowratetable.name == NULL){ printf("No Table Loaded"); while (exit=0){ scanf("%i\n", &option); if (option==1){ addflowratetable();} if (option==2){ loadflowratetable();} if (option==3){ displayflowratetable();} if (option==4){ estimatewaterdepth();} if (option==5){ printf("Terminating\n"); quit=1;} } }}}