I am not sure this solution would work because if a was 93, your program would produce the answer 39.3, but I am not really a software guy so idk. my logic is that
a=93
93%10 = 3
b=3
a=9.3
*next iteration*
b=30
9.3%10 = 9.3
b = 39.3
is this correct? just as a disclaimer, I am not trying be an jerk, I am just practicing interview questions lol