0

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

It has upper and lower range

8th Aug 2022, 2:03 PM
Vishnu
5 Antworten
+ 2
Well at least you can try searching the Codes section, there should be someone who wrote prime numbers related codes before.
8th Aug 2022, 2:35 PM
Ipang
+ 1
Please try to write it yourself first. It's a task given to you, none of us here are obliged of anything.
8th Aug 2022, 2:22 PM
Ipang
+ 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.
8th Aug 2022, 3:16 PM
JaScript
JaScript - avatar
0
I am. Stuck please help
8th Aug 2022, 2:25 PM
Vishnu
0
Thanks
8th Aug 2022, 3:26 PM
Vishnu