Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include<stdio.h>
- #include<string.h>
- #include<stdlib.h>
- typedef int NIZ[100];
- void unosUNiz(NIZ niz, int *brel){
- char odgovor = ' ';
- int broj;
- while (odgovor != 'n')
- {
- printf("Unesi broj: ");
- scanf("%d", &broj);
- niz[*brel] = broj;
- (*brel)++;
- printf("da li zelite da nastavite? Y/N\n");
- fflush(stdin);
- scanf("%c", &odgovor);
- }
- }
- void prikazi(NIZ niz, int brel){
- int i;
- for (i = 0; i < brel; i++)
- {
- printf("%d ", niz[i]);
- }
- printf("\n");
- }
- void unesiElementNaKrajNiz()
- int main(void){
- NIZ niz;
- int brel = 0;
- unosUNiz(niz, &brel);
- prikazi(niz, brel);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement