Anyone has it, real mode, 16 bit registers
Hmm .. what do you mean by average algorithm? Sum some numbers together and divide them by how many there were?
Sounds a bit like a homework assignment :wink.
I am really amused since you called finding an average an algorithm. :toothy
Average: (element1 + element2 + ele.....) DIV (number of elements)
This is about as obvious as it gets.
At least have a go - you might even learn something ;)
Hi...
if you want more complicate algorithm take a look this:
avg_b[1] = a1/1
avg_b[2] = (a1+a2)/2 = ((1*a1/1)+a2)/2 = (1*avg_b[1]+a2)/2
avg_b[3] = (a1+a2+a3)/3 = ((2*((a1+a2)/2))+a3)/3 =(2*avg_b[2]+a3)/3
...
...
avg_b[n] = ((n-1)*avg_b[n-1]+an)/n
--HadorĀ :8)