OUSL
ECK 3131
Q 003
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
int d,i,x,y,rand_num[100];
int z;
//randomize();
printf(" 100 random numbers from 0 to 99 ");
for(i=0; i<100; i++)
{
rand_num[i]=rand() % 100 ;
printf("%d - %d ",i,rand_num[i]);
}
for(x=0; x<100; x++)
{
z=0;
for(y=0; y<100; y++)
{
if (x==rand_num[y])
{
z=z+1;
}
}
printf(" frequency[%d] = %d ",x,z);
}
scanf("%d",&d);
return 0;
}

Insert Another Sub Header Here
Insert Another Sub Header Here
