Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define RozmiarTablicy 1000
- struct struktura
- {
- int tab[RozmiarTablicy];
- int LiczbaElementow;
- int schowek[RozmiarTablicy];
- int LiczbaKopiowanych;
- }
- ;
- void add(struct struktura* dodaj);
- void rew(struct struktura* odwroc);
- int main()
- {
- char akcja[4];
- scanf ("%3s", akcja);
- while(1)
- {
- if(strcmp(akcja, "ext"==0))
- break;
- else if(strcmp(akcja, "add"==0))
- add(&lista);
- else if(strcmp(akcja, "sho"==0))
- }
- struct struktura lista;
- lista.LiczbaElementow = 0;
- lista.LiczbaKopiowanych = 0;
- }
- void add(struct struktura* dodaj)
- {
- scanf("%d", &(dodaj->tab[dodaj->LiczbaElementow]));
- dodaj->LiczbaElementow++;
- }
- void rew(struct struktura* odwroc)
- {
- int a;
- int b;
- scanf("%d %d", a, b);
- }
- void sho(struct struktura* pokaz)
- {
- int i=0;
- for(i=0; i<pokaz->LiczbaElementow; i++)
- {
- printf("%d, " ,pokaz->tab[i])
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement