Q-1 print the series of all prime no till N #include <stdio.h> int main() { int prime(int); int a; scanf("%d",&a); while(a>=2) { prime(a); a--; } return 0; } int prime(int x) { int i=2; for(i=2;i<=x-1;i++) { if(x%i==0) { return 0; } } if(x==2) { printf("%d",x); return 0; } if(i==x) { printf(" %d",x); return 0; } }
Technical Keeda is best plateform for learning coding, Programming,competitive programming ,c++ language. Here we Provide best explaination of Programming question also Here You can boost your technical knowledge.You Will get aware of latest technology available in market.