From 154efab9e7f1c9a48ae0e4e0efecad679da36066 Mon Sep 17 00:00:00 2001 From: Vexatos Date: Sun, 21 Oct 2018 00:21:25 +0200 Subject: [PATCH] Fixed printing of the Thomas Algorithm implementation in Julia --- contents/thomas_algorithm/code/julia/thomas.jl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/contents/thomas_algorithm/code/julia/thomas.jl b/contents/thomas_algorithm/code/julia/thomas.jl index bdea7436a..a43be8eb2 100644 --- a/contents/thomas_algorithm/code/julia/thomas.jl +++ b/contents/thomas_algorithm/code/julia/thomas.jl @@ -30,12 +30,13 @@ function main() c = [4.0, 5.0, 0.0] d = [7.0, 5.0, 3.0] - println("The system,") - println(a) - println(b) - println(c) - println(d) - println("Has the solution:") + println( + """The system + $(join((b[1], c[1], "", "|", d[1]), "\t")) + $(join((a[2], b[2], c[2], "|", d[2]), "\t")) + $(join(("", a[3], b[3], "|", d[3]), "\t")) + Has the solution:""" + ) soln = thomas(a, b, c, d, 3)