Solving systems of linear equations using Cramer's method