#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],n,i,j,count=0;
clrscr();
printf("\nEnter the n numbers:");
scanf("%d",&n);
printf("\nEnter the numbers: ");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
printf("\nEnter the number to count the
occurrences: ");
scanf("%d",&j);
for(i=0;i<n;i++)
{
if(j==a[i])
{
count++;
}
}
printf("\nThe no of occurrences of given
number:%d",count);
getch();
}
//OUTPUT:
//Enter the n
numbers:5
//Enter the
numbers: 11
//12
//11
//11
//14
//Enter the
number to count the occurrences: 11
//The no of
occurrences of given number:3
Good job!
ReplyDeleteIn the event that you don't have your framework kept up you could be taking in hurtful poisons furnace repair patterson
ReplyDeleteWindow/divider climate control systems are anything but difficult to introduce; and can likewise be effortlessly expelled and put away furnace repair patterson
ReplyDelete