Advertisement
KlimexuS

Untitled

Jan 5th, 2018
60
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. #define RozmiarTablicy 1000
  3.  
  4. struct struktura
  5. {
  6. int tab[RozmiarTablicy];
  7. int LiczbaElementow;
  8. int schowek[RozmiarTablicy];
  9. int LiczbaKopiowanych;
  10. }
  11. ;
  12.  
  13. void add(struct struktura* dodaj);
  14. void rew(struct 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[dodaj->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.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement