LINEAR SEARCH IN AN ARRAY About Projects Tutorial Videos #include<stdio.h> void main() { int a[10],i,j,n,count=0; printf("enter the array limit:\n"); scanf("%d",&n); printf("enter the array elemants:\n"); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(a[i]==a[j]) { count=count+1; } } printf("%d repeats %d times\n",a[i],count); } } FREE ZONE TUTOR.................................YOUR FEEDBACK IS OUR KEY TO...
Posts
Showing posts with the label linear search