==== ==== ==== ==== ====
num  ten  tmp  bool div
==== ==== ==== ==== ====

>+++++++++<
[
 >>>+<<                bool= 1
 [>+>[-]<<-]           bool= ten==0
 >[<+>-]               ten = tmp
 >[<<++++++++++>>>+<-] if ten=0 ten=10  inc div
 <<-                   dec ten     
 <-                    dec num
]
>>>>[<<<<+>>>>-]<<<<   copy div to num
>[-]<                  clear ten

