Advertisement
Kajoj

Std15.10.22_6

Oct 22nd, 2015
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int a,t=20;
  6.     printf("Podaj liczbe od ktorej wyswietlac liczby parzyste: ");
  7.     scanf("%d",&a);
  8.     for (int i=0; i<t;i++)
  9.     {
  10.       if (a%2==0)
  11.             if (a+(i*2)==0)
  12.               t=22;
  13.         else
  14.           printf("%d ",a+(i*2));
  15.       else
  16.         if (a+1+(i*2)==0)
  17.           t=22;
  18.         else
  19.           printf("%d ",a+1+(i*2));
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement