summation of odds and evens

Repetition Structures : Summation of Odds and Evens
Design a Java program that calculates and then outputs the sum of all odd and then all even numbers between 0 and 100 separately. The program finally prints which of these summations is larger and also prints the difference between these two summations.
Tips : ( For Odd numbers generate and add : 1 + 3 + 5 + 7 + … + 97 + 99 and for Even numbers generate and add 2 + 4+ 6 + 8 + … 98 + 100 ).You may use the repetition method of your choice (for-loop, while, or do-while) to design your project.
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

 

"Is this question part of your assignment? We Can Help!"

Essay Writing Service