#include <stdio.h> #include<math.h> int main() { int a[101]; int i,j,n = 100; a[1] = 0; for (i = 2; i <= 100; i++) { a[i] = i; for (j = 2; j < sqrt(i); j++) { if (a[i] % j == 0) a[i] = 0; } } for (i = 2; i <= 100; i++) { if (a[i] != 0) printf("%d\t", a[i]); } return 0; }