Write a program to accept 20 no's into a array and then find
how many times a particular no is repeated in the array
What am i doing wrong?
Code:main() { printf("Enter 20 no"); int a[20],i=0,b=0,count=0,d=0,j=0; for(i;i<=20;i++) { scanf(" %d ",&a[i]); } printf("Which no would you like to find? "); scanf(" %d",&b); for(j;j<=20;j++) { if(a[j]==b) { int count=count+1; } else {} } printf("The no %d repeated %d time in the given array \n",b,count); getch(); }