Answers for "number primes"

2

prime number

// PRIME NUMBER
// 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

let number = 5;
if(number < 2){
  console.log("less then 2 not prime")
}
let flag = false;
for(let i=2;i<number;i++){
  if(number % i === 0){
    flag = true;
  }
}
if(flag){
  console.log("Not prime ")
}
else{
  console.log("Prime")
}
Posted by: Guest on July-27-2021
23

prime numbers

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 ...
Posted by: Guest on January-07-2021
6

prime number

a number that is divisible only by itself and 1 (e.g. 2, 3, 5, 7, 11)
suppose a number 'n' it can be divided by if '1' and only by itself then it can be a prime number
Posted by: Guest on January-19-2021
2

prime numbers

A number only divisible by 1 and itself
Posted by: Guest on May-04-2021
-1

What are prime numbers

Numbers with 2- factors.

2 is a composite number because it has less than 2 factors (1, 2)
Posted by: Guest on June-17-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language