Advertisement
Sabbir-bin

1to 50 inculsive

Sep 9th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int k;
  6. printf("Even numbers between 1 to 50 (inclusive):\n");
  7. for (k = 1; k <= 50; k++)
  8. {
  9. if(k%2 == 0)
  10. {
  11.           printf("%d ", k);
  12.         }
  13.     }
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement