Pages

Friday, 10 June 2022

Chapter 24 // Exercise 4 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.

Chapter 24 // Exercise 4

Get the Gaussian elimination program to work; that is, complete it, get to compile, and test it with a simple program.


First I had to google what in the hell is a gaussian elimination. That didn't help. So I started writing out the code from the book... that didn't really help either.

The code compiled but when running the program, it always errored in the classical elimination bit as the pivot was always 0 on the second round of the for loop.

I guess that was the point though? I think it's always supposed to fail but I honestly have no idea. Anyway, I completed the code, got it to compile and tested it with a simple program so, exercise done I guess??

EDIT - I completed this post, scheduled it then did exercise 5. When starting exercise 6 I realised my randomMatrix generator for a 2d array was complete garbage and that's why it always crashed lol.


No comments:

Post a Comment