/ / The execution environment is VC 6.0 // Strip of solving equation through Gaussian minus, Solution // INPUT: / / 2 5 8 // 9 2 12 // Output: // x1: 1.073171 // x2: 1.170732 // Equation as follows : // {2X 5Y = 8 // {9X 2Y = 12 # include
Void main (void) {Int N, I, J, K; Double Client, Temp = 0.0; Double ** A;
Printf ("Input Methods (" The coefficients are indicated by 0), the last row is the value of B: / n "); PrintF (" 4 5 2 3 2 5 / N "); Printf (" 4 6 2 1 0 2 / N "); Printf (" 4 5 2 1 3 2 / N "); Printf (" 1 2 1 2 3 2 / N "); Printf (" 0 2 5 1 1 3 / N "); Printf (" " Please enter the number of unknown quantities: "); scanf ("% d ", & n); printf (" / n Please enter the coefficient matrix and right end vector / N ");
// Allocate memory space a = new double * [n]; for (i = 0; i For (i = 0; i