/*NAME : CLASS:- TE IT (1) ROLL NO :ASSIGTMENT NAME:- program to print even nos & prime no using 1D array */ public class Array { public static void main(String args[]) { int i=0,n=0,k=0,flag=0; int arr[]={11,13,14,15,16,19,18}; int even[]=new int[10]; int prime[]=new int [10]; int odd[]=new int [10]; n=arr.length; for(i=0;i
System.out.println(+arr[i]); } }
}
} /*output Even numbers are: 14 16 18 Odd numbers are: 11 13 15 19 Prime numbers are: 11 13 */