lizfcm/notes/Oct-6.org
2023-10-09 21:08:25 -06:00

276 B

  for (int k = 0; i < (n - 1); k++) {
    for (int i = k+1; i< n; i++) {
      float factor = a[i][k] / a[k][k];
      for (int j = k+1; j < k; j++) {
        a[i][j] = a[i][j] - factor * a[k][j];
      }
      b[i] = b[i] - factor * b[k];
    }
  }