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
Can I explicitly call a destructor if I've allocated my object with new?

What is  T y pe C a s t Op er a t o r :   T h e f l o a t c a n b e c o n v e r t e d t o i n t e g e r v a l u

write a java program padovan string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Pado

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Explain redirection in c++

Develop a function to calculate sum of n even integers starting from a given even integer

please answer the question of following Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? B



In order to override a method, a subclass of the class which originally declared the method have to declare a method along with the same name, return type (or a subclass of that re