Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5.     int a=3, b, i=0;
  6.     while (i != 25)
  7.     {
  8.         if (((a%2) != 0) && ((a%3) != 0) && ((a%5) != 0) && ((a%7) != 0) &&
  9.         (((a+2)%2) != 0) && (((a+2)%3) != 0) && (((a+2)%5) != 0) && (((a+2)%7) != 0)
  10.         || (a == 3) || (a == 5) || (a == 7) || ((a+2) == 3) || ((a+2) == 5) || ((a+2) == 7))
  11.         {
  12.         printf("%d \t%d\n",a, (a+2));
  13.         i++;
  14.         }
  15.         a++;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement