Alx09

Untitled

Apr 16th, 2020
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. unsigned i, n;
  7. printf("n= "); scanf("%d", &n);
  8. n = 1 << n;
  9. for (i = 2; i <= n; i += 2) {
  10. if (((i - 1) & 7) != 7)
  11. printf("%d ", i);
  12. }
  13. system("pause");
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment