answersLogoWhite

0


Best Answer

sum = 0

for(n = 0; n <= 10; n += 2) sum += n;

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Algorithm to find the sum of even numbers between 1 to 10?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write algorithm and draw flowchart to find the sum of even numbers?

jgfujtf


Can you write an algorithm to find the beast numbers?

maybe


Algorithm to find the sum of even numbers between 1and 10?

1.start 2.n=1,s=0 3 compute s=s+n 4 compute n=n+1 5 check n&lt;=10 go to step3 else go to step 7 6 display s 7 stop


How many even numbers can you find between 20 and 40?

Show a modified algorithm flowchart to list even numbers between 20 and 40, 22, 24, 26, 28, 30, 32, 34, 36, 38 and that is 9 numbers


How can you use the Euclidean Algorithm to find the GCF of three numbers?

By dividing


What are the examples of algorithm in the flow chart?

TO find the sum of n numbers?


What do you notice when you find the difference between an odd and even numbers?

The answer is an odd number.


What is the algorithm of LCM of more than 3 numbers?

If you use methods based on prime factors, it is the same whether you have 2, 3, or more numbers: find all the factors that occur in any of your numbers. If you use a method based on Euclid's Algorithm (that is, lcm(a, b) = a x b / gcf(a, b), where you find the gcf with Euclid's Algorithm), then you can find the lcm for two numbers at a time. For example, to get the lcm of four numbers, find the lcm of the first two, then the lcm of the result and the third number, than the lcm of the result and the fourth number.


What do you notice when you find the difference between two odd numbers?

The difference is an even number.


What happens to the median when you come up with two answer?

when you have an even amount of numbers while trying to find the median, you first find the two numbers that are at the median and then take all the numbers between them and find the median of that. if that amount of digits is also even, then you must have a decimal median.


Is there an algorithm that will automatically solve a Rubik's cube?

Such an algorithm is called a 'God algorithm', from the fact that it would only be known by god/the gods. Although many have tried to find it, none have so far discovered it (assuming it exists). To solve a cube by algorithm, you need to know the appropriate algorithm to apply and when in the stages of solving; different sets can use large numbers of algorithm.


How you find paired number?

Paired numbers refer to two numbers that go together in some way, such as even and odd numbers, prime numbers, or consecutive numbers. To find paired numbers, you need to identify the relationship between the numbers you are working with and determine how they are connected or paired. For example, in the case of even numbers, you would pair each even number with its corresponding odd number.