Then use a for loop to iterate the numbers from 1 to N
Then check for each number to be a prime number. If it is a prime number, print it.
Approach 1: Now, according to formal definition, a number ‘n’ is prime if it is not divisible by any number other than 1 and n. In other words a number is prime if it is not divisible by any number from 2 to n-1.
Below is the implementation of the above approach:
Answers & Comments
Verified answer
Answer:
First, take the number N as input.
Then use a for loop to iterate the numbers from 1 to N
Then check for each number to be a prime number. If it is a prime number, print it.
Approach 1: Now, according to formal definition, a number ‘n’ is prime if it is not divisible by any number other than 1 and n. In other words a number is prime if it is not divisible by any number from 2 to n-1.
Below is the implementation of the above approach:
Explanation:
plz make me brainlist
Answer:
2+1=3+2=5+2=7 7+3=10
Explanation:
2+1=3+2=5+2=7 7+3=10