C program for count the no which you want , C/C++ Programming

 

# include stdio.h>

# include string.h>

# include conio.h>

void main()

{

          int i=0,j=0,b=0,count=0;

          int a[100];

          for(i=0;i<100;i++)

          {

                   a[i]=0;

          }

          i=0;

          clrscr();

          printf("\nENTER THE LIMIT OF NO: ");

          flushall();

          scanf("%d",&j);

          for(i=0;i

          {

                   printf("\nENTER THE NO %d:-",i+1);

                   scanf("%d",&a[i]);

          }

 

          printf("\nENTER THE NO THAT U WANT TO COUNT: ");

          flushall();

          scanf("%d",&b);

          for(i=0;i

          {

                   if(b==a[i])

                   {

                             count++;

                   }

          }

          printf("\nTHE NO %d IS REPEATED %d TIMES",b,count);

          getch();

}

 

OUTPUT :

ENTER THE LIMIT OF NO: 4

ENTER THE NO 1 : 5

ENTER THE NO 2 : 4

ENTER THE NO 3 : 4

ENTER THE NO 4 : 4

THE NO 4 IS REPEATED 3 TIMES

Posted Date: 9/10/2012 7:39:38 AM | Location : United States







Related Discussions:- C program for count the no which you want , Assignment Help, Ask Question on C program for count the no which you want , Get Answer, Expert's Help, C program for count the no which you want Discussions

Write discussion on C program for count the no which you want
Your posts are moderated
Related Questions
example of padovan string program

We started off taking about input, output, CPU and memory devices. Within C we need a method of storing large amounts of data in memory. We have used the idea of variables (pointer

how to find the volume of cone , cylinder and sphere ?

Question: (a) Write down the class 'ListNode' to contain the following:- (i) variable data of type Object (ii) variable next of type ListNode (iii)

Array types An array is a collection of objects of a one data type. The individual objects are accessed by their position in the array. This way of accessing is known as indexi

Define the Modulo Division Operator in c language? The C provides one more arithmetic operator % called as modulo division operator and this operator yields the remainder of an


In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with pag

I need Profile and optimize a C++ library for speed Project Description: Optimize and profile an existing C++ library for speed. This library uses OpenMP and OpenCV and C+

push and pop operation using array draw flowcharts