.model small
.stack 100
.data
line1 db 03,12,15,14,01
avg db ?
.code
mov ax,@data
mov ds,ax
lea si,line1
mov cx,0005h
mov al,00+1 l1:add al,[si]
inc si
loop l1 mov ah,00h
mov bh,05h
div bh
mov [si],al
mov ah,4ch
int 21h
end
If the average of 5 numbers is 23 and the range is 10, what are the 5 numbers?
0000 0001 0010 0011 0100 0101
Add the five numbers; divide the result by 5.
int AverageEvenNumbers( int n ) { return ( n / 2 ) + 1; } n / 2 will always give you an int, aka no decimals if n is 5 the even numbers are 2 and 4, the average is 3 (5) / 2 is 2 2 + 1 is 3 if n is 10 the even numbers are 2 4 6 8 10, the average is 6 10 / 2 is 5 5 + 1 is 6 enjoy
Accept 5 numbers in an array and display it.
Sum of 5 numbers with an average of 10 = 50
5
2
If the average of 5 numbers is 23 and the range is 10, what are the 5 numbers?
5 + 8 + 2 = 15. 15 / 3 = 5 All you have to do is add the numbers, then divide the answer by how many numbers you added.
Including 5..... average=7.75
Their sum divided by 5.
3, 5, and 7 are three prime numbers whose average is 5.
1)start 2)input 5 numbers m,a,i,r,a 3)average=sum/5 4)printsum 5)stop
The average of a set of numbers is the sum of all the numbers, divided the amount of numbers in the sequence. For example, the average of 12, 14, 13, 15, and 20, would be the sum of the numbers, 74, divided by the amount of numbers in the sequence, 5. So the average is 74/5, which is 14.8.
3, 5, and 7 are three prime numbers whose average is 5.
Mean is the same as average. For example, to get the average of 5 numbers, you add them all together, then divide by 5 (because there are 5 numbers).