Advertisement
KlimexuS

Untitled

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