Computer Science, asked by bhanutej773, 7 months ago

write a program to create a one dimensional array of n integers . print only those integers from the array which are prime numbers

plzzzzzzzzzz urgent

Answers

Answered by paarthhans2006
1

import java.util.Scanner;

public class PrimeNumbers{

public static void main (String[] args){

int[] array = new int [5];

Scanner in = new Scanner (System.in);

System.out.println("Enter the elements of the array: ");

for(int i=0; i<5; i++)

{

array[i] = in.nextInt();

}

Please Mark As Brainliest If You Don't Mind .....Please Mark As Brainliest If You Don't Mind .....Please Mark As Brainliest If You Don't Mind .....

Similar questions