In this loop we always compute the sum of digits in temporary_ sum variable and convert it into string str till its length become 1 and increase the count in each iteration .
while ( str . length ( ) > 1 ) { temporary_sum = 0 ;