Why input a float for a loop condition? Also the second loop is useless just initialize total to 0 and each time you input a value add it to total. Btw maybe try std::setprecision
The first part ot the code is for summary . I thought it is enough to divide by the number of units cause the summary has worked.BTW MiiNiPaa I meant result is not in decimal number.
i have tried setprecision but it didnt help.