Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone help me with this and it will actually run and give the correct output in C++? I created a program for it but
Can someone help me with this and it will actually run and give the correct output in C++? I created a program for it but it's not running.
Naive Gauss Pseudocode procedure Naive_Gauss(n, (aij), (b;), (x;)) integer i, j, k, n; real sum, xmult real array (ajj) 1:nxl:n, (b;) 1:n, (x;)1:n for k = 1 to n - 1 for i =k+1 to n xmult aik akk Aik + xmult for j =k+1 to n dij + dij (xmult)ak; end for b;b; (xmult)bk end for end for Xn+ bn/ann for i = n - 1 to 1 sumbi for j =i+1 to n sum + sum dijXj end for X; + sum/aji end for end procedure Naive_Gauss Solution Since the naive Gaussian elimination procedure Naive_Gauss can be used, all that is needed is a calling program. We decide to use n = 4, 5, 6, 7, 8, 9, 10 in this test. Here is a suitable pseudocode: UC Test NGE Pseudocode program Test NGE integer parameter m + 10 integer i, j, n; real array, (ajj) 1:mx1:m, (b;)1:m, (x;)l:m for n = 4 to 10 for i = 1 to n for j=1 to n aj + (i + 1)-1 end for b; + [(i + 1)" 1]/i end for call Naive_Gauss(n, (ajj), (b;), (x;)) output n, (xi) 1:n end for end program Test NGEStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started