So I have to write a program which writes all even numbers between 0 and 50 INTO AN ARRAY and then display them on the screen....
My problem is how i am going to put it into an array I only did part of it but I can't continue doing it...:-
public class Even_Number{
public static void main (String args[]) {
int L[]=new int[50];
int i;
int c =0;
for (i=0; i<50; i++)
if (i%2==0)
{
c++;
L[c] = i;
}
}
}