Binarysearch tree-------only one element is printing

hello @guptarahul3100
image
use while loop in place of if.