So, for example, I have array: [1, 4, 9, 3, 9]

I need to find all max elements [9, 9] and their index [2, 4]

How can I do this? In C language

```
int i, pom, max;
max=*gradovi;
for(i=0;i<n;i++) {
  if(*(gradovi+i)>max) {
    max=*(gradovi+i);
    pom=i;
  }
  if(*(gradovi+i)==max) {
    pom=i;
  }
}
return pom;

```

I need postions of all max elemenents, but this print just last