Write the chain on separate lines.
This commit is contained in:
parent
713f70041b
commit
61414ff5bf
@ -20,7 +20,7 @@ func printSequence(sequence collatz.Sequence) {
|
|||||||
log.Printf("Collatz sequence with %d iterations:", sequence.Iterations)
|
log.Printf("Collatz sequence with %d iterations:", sequence.Iterations)
|
||||||
for i, num := range sequence.Sequence {
|
for i, num := range sequence.Sequence {
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
builder.WriteString(" -> ")
|
builder.WriteString("\n-> ")
|
||||||
}
|
}
|
||||||
builder.WriteString(num.String())
|
builder.WriteString(num.String())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user