Home > Back-end > O solve the problem of cin&switch statement in c
O solve the problem of cin&switch statement in c
Time:09-15
Char I; Cin> i; While (getchar ()! ) ='\ n'The continue; The switch (I) { Case '1' : Excourse. CourseInfoInput (); System (" pause "); Break; Case '2' : Excourse. CourseSelective (); System (" pause "); Break; Case '3' : Excourse. CourseInfoOutPut (); System (" pause "); Break; Case '4' : Excourse. The Search (); System (" pause "); Break; Case '5' : Excourse. CourseSelection_Statistics (); Break; Case '0' : The exit (0); Default: Cout<& lt;" \ n input error please re-enter "& lt; Break; } 12 is executed in the program input 1, the result of the use to the cin I only 1 copy this results cannot be saved 2 how to solve this problem, the result o