Posts by Ardov • 41 points
1 post
-
4
votes2
answers6127
viewsQ: Code for calculating the first N primes in C?
First, I got this: #include <stdio.h> #include <stdlib.h> int main(){ int i=13,w=0,k; for(k=i-1;k!=1;k--){ if(i%k==0){w=1; break;} } if(w==0){ printf("\n%d eh primo",i); }…