//simply we are going to use the approach that the numbers that are divisble by prime numbers are not prime and the others are prime.
#include<stdio. h>
#include<math.h >
int main()
{
int n,i,arr[100000],size=0,j,temp; // array is for storing prime numbers
scanf("%d",&n); // we will be finding prime numbers between 2 to n (both inclusive)
arr[0]=2; ...
User Profile
Collapse
-
ujjawaltaleja started a topic want to know the complexity of my program ,new way to find prime numbersin Cwant to know the complexity of my program ,new way to find prime numbers
No activity results to display
Show More