### Stem-and-leaf plot - Rosetta Code

; Delete the old stem and leaf file (if any), write our new contents to it, then show it: FileDelete Stem and leaf. txt FileAppend %ToPrint%, Stem and Leaf. txt Run Stem and leaf. txt return PadStem (Stem) {Spaces = 0 While (3-StrLen (Stem) Spaces ); If the stems are more than 2 digits long, increase the number 3 to one more than the stem length.

More details