#include <stdio.h> int main() { int n = 15; int mark[16] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int c; int j; for (c = 2; c * c <= n; c++) { if(mark[c]!=1){ for(j=2;j<=n/c;j++){ mark[c*j]=1; } } } for(c=2;c<=n;c++){ if(mark[c]!=1){ printf("%d\n",c); } } return 0; }