#include #include #include #include #include int data_count, i; float sum_y, sum_x, sum_x_squared, sum_xy=0; float gradient, y_intercept, *x_values, *y_values; float x[100],y[100]; FILE *store; void file_save(void) { store = fopen("j:/StoredValues.txt", "w"); for (i=0; i: ", i); scanf("%f", x_values+i); } printf("\nPlese Enter Your Y Values: \n"); for(i=0;i: ", i); scanf("%f",y_values+i); } calculations(); file_save(); break; } case 2: { if (x_values==NULL) { printf("\n\nError! Please Enter Data First\n\n"); break; } printf("\nEntered Values: \n"); printf("\n%12s%12s\n\n", "x", "y"); for(i=0;i