Computer Science, asked by shree885, 9 months ago

write an algorithm for average of 10 number​

Answers

Answered by Anonymous
16

Answer:

If someone asks for help, show them the way to do it, not the finished result.

This is the same as memorizing, and in the end is of no help, as you cannot use the knowledge you would have gained with step-by-step thinking to reach a conclusion.

Thus: I have a problem I need to solve, sum of numbers 1 to 10.

1st thought, can I simplify? (And further down the road make an abstraction to include an algorithm to find any sum from “X” to “Y”?)

There are multiple ways to simplify the problem, one way is you could start off by lowering your end number (10) to a lower number.

How can I find the sum of 1 to 2?

Step 1) I have a starting point; 1

Step 2) What do I do when I increment the value of which I am sum’ing? - I add it to the previous value.

Remember, add it to previous value: I have to remember a value

Step 3) Check if I have reached the end of the numbers I wish to sum. (We will be skipping this step in the first code, to simplify)

Answered by sonisiddharth751
6

Answer:

An algorithm to average n numbers is very simple just two steps really :-

(1) add the n numbers together.

(2) divide their sum by n that's is all there is to be it.

I am no going to write your program for you no. pick a language, RTFM, and write it yourself.

hope it helps you

please mark me as brainliest

❤️❤️☺️❤️❤️❤️

Similar questions