#include <stdio.h> #include <stdlib.h> /* Puzzle L13 -- print integers from 1 to n that are not | multiples of 3 or 5. | Print 10 integers per line. | End the last line with "\n", even if the line has fewer than | ten numbers on it. | */ int main() { int j; int count = 0; int n = 100; for (j=1; j<=n; j++ ) { if ( !(j%3 == 0 || j%5 == 0 ) ) { printf("%3d", j); if ( count%10==9 ) printf("\n"); count++ ; } } if ( count%10 != 9 ) printf("\n"); return 0; }