0

Guys please help me on c

write a program to print prime numbers from 1to n where n is input by the user

8th Jul 2018, 7:05 AM
Gurpreet Singh
1 Odpowiedź
+ 1
create a function that checks if a number is prime by dividing up to it's square root and then iterate from numbers 1 to N and run the function on each, if it's prime, output it.
8th Jul 2018, 7:56 AM
hinanawi
hinanawi - avatar