#include<stdio.h> void main() { printf("Frequency of each element of an array\nA.Mohammed Irfaan\n"); int n, ary[n], i, c, m; printf("Enter how many number to print:\n"); scanf("%d", &n); for(i=0; i<n; i++) { printf("Enter the number %d:\n", i+1); scanf("%d", &ary[i]); } m=0; c=0; for(m=0; m<n; m++) { for(i=n-1; i>=m; i--) { if(ary[m]==ary[i]) { c=c+1; } } for(i=0; i<m; i++) { if(ary[m]==ary[i]) { c=c+1; } } printf("The frequency of element %d =%d\n", m+1, c); c=0; } }