Category: Trial Division

02
Jun
2017

Prime Number: Trial division | Prime check upto N in C

code: #include<bits/stdc++.h> int main() { int i,j,n,flag=0; printf(“enter number: “); scanf(“%d”,&n); for(i=2;i<=n;i++) //first iterate upto n {…