the major tick length we will not worry about actual distanceshoweverand just print one tick per line recursive approach to ruler drawing our approach to drawing such ruler consists of three functions the main function drawruler(draws the entire ruler its arguments are the total number of inches in the rulerninchesand the major tick lengthmajorlength the utility function drawonetick(draws single tick of the given length it can also be given an optional integer labelwhich is printed if it is nonnegative the interesting work is done by the recursive function drawticks()which draws the sequence of ticks within some interval its only argument is the tick length associated with the interval' central tick consider the -inch ruler with major tick length shown in figure (bignoring the lines containing and let us consider how to draw the sequence of ticks lying between these lines the central tick (at / inchhas length observe that the two patterns of ticks above and below this central tick are identicaland each has central tick of length in generalan interval with central tick length > is composed of the followingan interval with central tick length