#include #include int main(){ int n; int *brojevi; FILE *f; int i; // 1. otvoriti fajl brojevi.txt f = fopen("brojevi.txt","r"); if(f==NULL){ printf("-1\n"); exit(EXIT_FAILURE); } // 2. procitati prvi broj iz tog fajla i //upisati ga u n fscanf(f, "%d", &n); // 3. alocirati dinamicki niz brojevi tako // da ima n brojeva brojevi = (int*) malloc(sizeof(int)*n); if(brojevi==NULL){ printf("-1\n"); exit(EXIT_FAILURE); } // 4. popuniti niz brojevima iz fajla for(i=0; i