Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a[100],n,i,j;
- printf("Unesite broj n : ");
- for (j=0;j<100;j++)
- {
- a[j]=0;
- }
- do
- {
- scanf("%d",&n);
- if (n>0 && n<=100) { a[n+1
- ]=a[n+1]+1; }
- } while (n!=-1);
- for (i=0;i<100;i++);
- {
- if (a[i] != 0) { printf("Broj %d se ponavlja %d puta ",i,a[i+1]); }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement