C Program to Find Mode

The mode is the value that appears most often in a set of data. The mode of a discrete probability distribution is the value x at which its probability mass function takes its maximum value. In other words, it is the value that is most likely to be sampled.

[cc lang=”c”]
#include
int arr[100],temp,i,j,n,k=0,count=0;
int mode[100];
main()
{
printf(“Enter Array Elements n”);
scanf(“%d”,&n);

for(i=0;iarr[j])
{
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
}
}

printf(“Sorted Elements are n”);
for(i=0;i

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *