Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int main()
  5. {
  6. int t[100],n,i;
  7.  
  8. printf("podaj rozmiar tablicy T nie większy niż 100;");
  9. scanf("%d" ,&n);
  10.  
  11. printf("podaj kolejno:\n");
  12. for (i=0; i<n; i++)
  13. {
  14. printf ("z(%d)=",i);
  15. scanf("%d",&t[i]);
  16. }
  17.  
  18.  
  19. for(int i=0;i<n;i++)
  20. if(t[i]%2) //lub if(tab[i]%2==1)
  21. printf("\n%d", t[i]);
  22. getch();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement