calculate the results for 3 digits