Code:I AM HAVING PROBLEMS WITH THE MENU. AFTER TYPING IN A CASE OPTION THE MAIN MENU SHOULD RE-APPEAR BUT DOES NOT. ANY SUGGESTIONS #include <stdio.h> #include <math.h> #include <grx20.h> #define length 2 int n, i, menu1; float m, y, y0, x, y, x1[length], y1[length], xsum, ysum, xysum, xsq[length]; float xsqsum, b[length], xres, yres, xplot, xploti, yplot, yploti, y2[length]; main() { /* Main menu */ menu1 = 1; while (menu1==1) { n = length; xsum = 0; ysum = 0; xysum = 0; xsqsum = 0; printf("What do you want to do? Select an option\n\n"); printf("1. Input data\n"); printf("2. View table of data\n"); printf("3. Plot line of best fit\n"); printf("4. Exit program\n"); scanf("%d", &menu1); switch (menu1) { case 1: /* Generate set of data */ printf("\nEnter the number of x-y values: "); scanf("%d", &n); for (i=0; i<n; i++ ) { printf("Enter x-y values separated by a space: "); scanf("%f %f", &x, &y); x1[i] = x; xsq[i] = x1[i]* x1[i]; y1[i] = y; xsum = xsum + x1[i]; xsqsum = xsqsum + xsq[i]; ysum = ysum + y1[i]; xysum = xysum + (x1[i]*y1[i]); } /* Calculate gradient */ m = ((n * xysum) - (xsum * ysum)) / (n * (xsqsum)) - (xsum * xsum); /* Calculate y-intercept */ y0 = (ysum - (m * xsum)) / n; for (i=0; i<n; i++ ) { y2[i] = y0 + m*x1[i]; b[i] = y2[i] - y1[i]; } printf("Gradient = %f, y-intercept = %f\n", m, y0); scanf("%d", &i); break; case 2: printf("X \t Y \t y-Y"); for (i=0; i<n; i++ ) { printf("%f %f %f", x1[i], y1[i], b[i]); } scanf("%d", &i); break; case 3: for (i=1; i<n; i++ ) { GrColor bgColour = 0; /* background colour*/ GrColor pColour = 2; /*plot colour*/ GrSetMode(GR_default_graphics); xres = GrScreenX(); yres = GrScreenY(); /*GrClearScreen(bgColour);*/ xplot = x1[i-1]; xploti = x1[i]; yplot = y1[i-1]; yploti = y1[i]; GrLine(xplot, yplot, xploti, yploti, pColour); } system ("PAUSE"); GrSetMode(GR_default_text); break; case 4: menu1 = 0; default: printf("Invalid option. Try again\n"); system ("PAUSE"); } } }