Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int n;
- scanf("%d", &n);
- int niza[n];
- for(int i = 0; i < n; i++) {
- scanf("%d", &niza[i]);
- }
- int brojac[100];
- for(int i = 0; i < 100; i++) {
- brojac[i] = 0;
- }
- for(int i = 0; i < n; i++) {
- brojac[niza[i]]++;
- }
- for(int i = 0; i < 100; i++) {
- if(brojac[i] > 0) {
- printf("Brojot %d se pojavil %d pati\n", i, brojac[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement