answersLogoWhite

0


Best Answer

for(int i = 1; i < 100; i+=2) {

System.out.println(i);

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a java program to find sum of even and odd numbers in given array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


Write a program for which give number in ascending number?

the following program will display all numbers given in the array in ascending order #include&lt;stdio.h&gt; void main() { int i,h,p; int numbers[10]={5,8,3,2,6,7,9,4,1,10}; for(p=0;p&lt;=8;p=p+1) { for(i=0;i&lt;=8;i=i+1) { if(numbers[i]&gt;numbers[i+1]) { a=numbers[i]; numbers[i]=numbers[i+1]; numbers[i+1]=a; } } } for(i=0;i&lt;=9;i=i+1) { printf("%d ",numbers[i]); } }


How do you write a program that removes all occurrences of a given X in a given sequence of numbers?

You do nothing! A sequence of numbers will contain no X and so nothing needs doing!


How do you write a c program sum of ODD Numbers in the Given Range?

Reference: cprogramming-bd.com/c_page4.aspx#ODD%20 Numbers


How do you write a program that calculates the sum of the matrix elements given numbers?

ring me and ill explain - 086 22222222222222227 ring me


Can you write a C program to find the sum of a given column in a 2D array?

Use the following function to find the sum of a given column in an array of integers: int sum_column (int** array, unsigned int rows, unsigned int columns, unsigned int column) { assert (column&lt;columns); int accumulator int row; accumulator = 0; for (row=0; row&lt;rows; ++row) { accumulator += array[row][column]; } return accumulator; }


Write a C program to extract a given word from a file?

program to extract a given word from a file


How do you write a program to find out the percentage of given numbers using the structure in C?

Count all the given numbers then count all the numbers of a given value. Divide one by the other and multiply by 100. For instance, if there are 50 numbers in total and 5 of them have the value 42, then the percentage of numbers with the value 42 is 5 / 50 * 100 = 10%.


How can you write a program specification for a given report?

It is your face


Write a program to reverse the given string?

Use for loop declare string array str[] and string variable l= string length of string array j=l for i=0 to i=l/2 then temp=str[i] str[i]=str[j-1] str[j-1]=temp j=j-1 now print str array it will be reversed


How do you write a fraction or decimal that has a value between the given numbers?

Without knowing what the numbers are, I would suggest taking the mean of the given numbers.