Advertisement
Sayukoo

Liczenie nieparzystych liczb +50

Oct 8th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int x,i,silnia;
  7.  
  8.     printf("Napisz konkretna liczbe/cyfre a program wypisze tylko te 50 nieparzystych od tej liczby: ");
  9.     scanf("%d",&x);
  10.     for(i=x;i<=x+50;i++)
  11.     {
  12.         if(i%2==1)
  13.         {
  14.             printf("%d",i);
  15.             printf("\n");
  16.         }
  17.  
  18.     }
  19.  
  20.  
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement