- 2
Write a function that computes the average of the digits in an integer. Use (double averageDigits (long n)
About functions in c++
1 Respuesta
+ 1
Try using the module (% 10) plugged into a loop.By making the module you get each separate digit. Then I have to update the number by removing the unnecessary digit by dividing by 10. And so on