#include<stdio.h> int main() { int a, b, n = 0; for (a=101 ; a <= 200; a++) { for (b=2 ; b <= a - 1; b++) { if (a % b == 0) break; if (b == a - 1) { printf("%d ", a); n++; } } if (n % 10 == 0) printf("\n"); } }