Skip to content

Instantly share code, notes, and snippets.

@mephir
Created October 21, 2018 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mephir/7692f57b59edcfa1127bd5fc6e099095 to your computer and use it in GitHub Desktop.
Save mephir/7692f57b59edcfa1127bd5fc6e099095 to your computer and use it in GitHub Desktop.
#include<stdio.h>
int * wczytaj_wspolczynniki() {
static int tab[4];
int i;
for (i = 0; i < 4; i++) {
printf("Podaj wspolczynnik %d: ", i + 1);
scanf("%d", &tab[i]);
}
return tab;
}
int main () {
int *tab;
tab = wczytaj_wspolczynniki();
int i;
for (i = 0; i < 4; i++) {
printf("Espolczynnik %d: %d\n", i+1, tab[i]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment