answersLogoWhite

0

Here is a simple program that will list all the even numbers between 1 and 50: public class EvenNumbers { public static void main(String[] args) {

for(int i=1; i<=50; i++) {

if(i%2 ==0) {

System.out.println(i);

}

}

}

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Program to print all the even numbers of an array in visual basic?

find even number in array


Java program to find sum on even numbers from 12-45?

sum = 0; for (int i = 12; i


Where can we find a debt calculator?

It is simple to do a search for what you need, and find a program or an app geared to you. Your local bank may also be able to tell you where to find a free one, or they may even offer a free program themselves.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a java program to find sum of even and odd numbers in given array?

for(int i = 1; i &lt; 100; i+=2) { System.out.println(i); }


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Find the largest palindrome made from the product of two 3-digit numbers?

906609=913*993 I found this using a relatively simple computer program that I wrote.


Write a Program in c to find palindrome numbers between any two numbers?

please somebody should help me answer this question..I have a project on it even! It seems almost impossible at the moment.


How do you find the median of an even set of number?

Find the average. That is, add all of the even numbers together, then divide that by the number of even numbers.


Shell program to find the sum of cube of individual digits of a number?

Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.


Write a program to find the sum of even numbers from 2 to50?

In Java:sum = 0;for (i = 2; i