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
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
Science,
3 months ago
English,
3 months ago
English,
3 months ago
Computer Science,
7 months ago
Social Sciences,
7 months ago
Political Science,
1 year ago
English,
1 year ago