Please add a c program to print prime no in a given range | Sololearn: Learn to code for FREE!

0

Please add a c program to print prime no in a given range

It has upper and lower range

8/8/2022 2:03:16 PM

Vishnu

5 Answers

New Answer

+2

Well at least you can try searching the Codes section, there should be someone who wrote prime numbers related codes before.

+1

Please try to write it yourself first. It's a task given to you, none of us here are obliged of anything.

+1

Hint: 1. You organize a loop in a given range. 2. You check the loop variable if it is divisible without a rest with a smaller number except the 1. For this you can create a second loop in the range from 2 up to the loop 1 variable. 3. If no this is a prime number, which can be added to a result array. 4. You sort the result array. 5. You print the items of this array.

0

I am. Stuck please help

0

Thanks