counter = 1 reverse = false lines = 5 while lines > 0 do if reverse then for counter to 1 step -1 do print counter, " " endfor reverse = false else for counter to 5 do print counter, " " endfor reverse = true endif lines = lines - 1 endwhile