For example, if I have a vector A. A=[23 44 2 -4 -19 15 1 -70 78] then how can I compute the sum and the average of all the odd numbers by using only the loop method and no built-in functions ?
With the built-in functions I get 20 and 5 for the sum and the average of the odd numbers, but how can I compute that same answer with the loop method.
thanks,
Best Answer