1.

Write a program to input n numbers in an array and print only prime number​

Answer»

Answer:

Prime Number PROGRAM in Java

  • PUBLIC class PrimeExample{
  • public static void main(String args[]){
  • INT i,m=0,flag=0;
  • int N=3;//it is the number to be checked.
  • m=n/2;
  • if(n==0||n==1){
  • System.out.println(n+" is not prime number");
  • }else{

Explanation:

HOPE IT WAS HELPFUL TO YOU...

MARK ME THE BRAINLIEST



Discussion

No Comment Found