#include <stdio.h> int main() { int i = 0, j = 0; int n = 1; int count = 0; for (i = 100; i < 999; i++) { n = 1; for (j = 2; j < i; j++) { if (i%j == 0) { n = 0; } } if (n == 1) { count++; } } printf("%d ", count); return 0; }
#include <stdio.h> int main() { int i = 0, j = 0; int n = 1; int count = 0; for (i = 100; i < 999; i++) { n = 1; for (j = 2; j < i; j++) { if (i%j == 0) { n = 0; } } if (n == 1) { count++; } } printf("%d ", count); return 0; }