answersLogoWhite

0

In Java:

sum = 0;
for (i = 2; i <= 50; i += 2)
sum += i;

Similar (perhaps identical?) in C.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: Write a program to find the sum of even numbers from 2 to50?
Write your answer...
Submit
Still have questions?
magnify glass
imp