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
Social Sciences,
3 months ago
Math,
3 months ago
Social Sciences,
3 months ago
Computer Science,
6 months ago
Social Sciences,
6 months ago
Political Science,
11 months ago
English,
11 months ago