Can you send me the psuedocode for this question

psuedocode to print all prime numbers in the range 1 to N

hi @ayush8744
i am telling you the algorithm

  1. for all i in the range 1 to N, check if it is prime or not, if i is prime, then print it, otherwise do nothing
  2. to check if a number “x” is prime or not:
    1. check if x is divisible by any number in the range 2 to x-1
    2. if such a number is found, x is not prime
    3. if such a number is not found, x is prime

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.