1.start
2.n=1,s=0
3 compute s=s+n
4 compute n=n+1
5 check n<=10 go to step3 else go to step 7
6 display s
7 stop
Chat with our AI personalities
To find the sum of even numbers between 1 and 10, you can use a simple algorithm. First, initialize a variable to store the sum. Then, iterate through the numbers from 1 to 10, checking if each number is even. If a number is even, add it to the sum. Finally, return the sum as the result of the algorithm.
Oh, dude, it's like super simple. You just add up all the even numbers between 1 and 10, which are 2, 4, 6, 8, and 10. Then you add them together: 2 + 4 + 6 + 8 + 10 = 30. Ta-da! That's your sum of even numbers between 1 and 10. Easy peasy.
Well, honey, it's not rocket science. You just add up all the even numbers between 1 and 10, which are 2, 4, 6, 8, and 10. Then you sum those bad boys up, and you get 30. Voilà!
write an algo to find the sum of even number from 1to n
102
Start print "the sum of all even numbers is infinite" end
sum = 0 for(n = 0; n <= 10; n += 2) sum += n;
The even numbers between 23 and 27 are 24 , 26.