How to write a Java program to find the sum of even numbers and odd numbers from 20 to 30 without using loops?
Answers
Answered by
2
logo
« Prev PageNext Page »
Java Program to Calculate the Sum of Odd & Even Numbers
This is a Java Program to Calculate the Sum of Odd & Even Numbers.
Enter the number of elements you want in array. Now enter all the elements you want in that array. We begin from the first element and check if it is odd or even. Hence we add that number into the required addition list dependng whether it is even or odd.
Here is the source code of the Java Program to Calculate the Sum of Odd & Even Numbers. The Java program is successfully compiled and run on a Windows system. The program output is also shown below.
PLEASE MAKE ME AS A BRAINLIST ANSWER
Similar questions
Social Sciences,
6 months ago
Math,
6 months ago
Geography,
6 months ago
Physics,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago