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;i
{
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
}
}
printf(“Sorted Elements are n”);
for(i=0;i
Recent Comments