namereq

21k+9

Jun 26th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     int i,count = 0;
  6.     for(i=1;count<100;i++){
  7.         if(i%3 == 0 && i%7 == 2){ /* i%21 == 9 でも可 */
  8.             count++;
  9.             printf("%d",i);
  10.             if(count%10 == 0){
  11.                 printf("\n");
  12.             } else {
  13.                 printf(":");
  14.             }
  15.         }
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment