Advertisement
KlimexuS

Untitled

Jan 5th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define RozmiarTablicy 1000
  4.  
  5. struct struktura
  6. {
  7. int tab[RozmiarTablicy];
  8. int LiczbaElementow;
  9. int schowek[RozmiarTablicy];
  10. int LiczbaKopiowanych;
  11. }
  12.  
  13. void add(struktura* dodaj);
  14. void rew(struktura* odwroc);
  15.  
  16.  
  17.  
  18. int main()
  19. {
  20. struct struktura lista;
  21. lista.LiczbaElementow = 0;
  22. lista.LiczbaKopiowanych = 0;
  23. add(&lista);
  24. int i = 0;
  25. for(i=0; i<lista.LiczbaElementow; i++)
  26. {
  27. printf("%d\n", lista.tab[i]);
  28. }
  29.  
  30. }
  31.  
  32. void add(struct struktura* dodaj)
  33. {
  34. scanf("%d", dodaj->tab[LiczbaElementow]);
  35. dodaj->liczbaElementow++;
  36. }
  37.  
  38. void rew(struct struktura* odwroc)
  39. {
  40. int a;
  41. int b;
  42. scanf("%d %d", a, b);
  43. for(a; i<a+(a-b)/2; i++;
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement