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


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?


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


What is the algorithm to find all shortest paths between two nodes in a graph?

One common algorithm to find all shortest paths between two nodes in a graph is the Floyd-Warshall algorithm. This algorithm calculates the shortest paths between all pairs of nodes in a graph by considering all possible intermediate nodes.


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.


How many even numbers between 68 amd 512?

To find the number of even numbers between 68 and 512, we first need to determine the range of numbers we are considering. The even numbers between 68 and 512 are inclusive of both 68 and 512. To find the total count of even numbers in this range, we need to consider that every second number is even. Thus, we divide the total range by 2 and add 1 to include both 68 and 512. Therefore, the total count of even numbers between 68 and 512 is (512-68)/2 + 1 = 223.


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.