#include extern "C" void dgesv_(int *, int *, double *, int *, double *, double *, int *, int *); // This function does nothing more than to set-up and execute a // call to the DGESV routine from the LAPACK package. int gaussian_elimination(double *A, double *b, int n) { int c1 = n; // number of equations int c2 = 1; // number of right hand sides double *pivot = new double[n]; int ok = 0; // output code dgesv_(&c1, &c2,(double *) A, &c1,(double *) pivot,(double *) b, &c1, &ok); delete pivot; return ok; } int main() { int N; std::cout << "Enter the dimension of the problem: " << std::endl; std::cin >> N; std::cout << std::endl; double* A = new double[N*N]; double* b = new double[N]; for (int i=0; i> A[i+k*N]; } } std::cout << std::endl; std::cout << "Enter the right hand side: " << std::endl; for (int k=0; k>b[k]; } gaussian_elimination(A, b, N); std::cout << std::endl; for (int i=0; i