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
program for compiler design in c

to count number of occurances

Explain Operators in C Language? The C language is very rich in built - in - operators and it places more significance on operators than do most other computer languages. The C

Explain the Command Line Parameters? The Command line arguments are parameters supplied to a program from the operating system. These arguments are parameters accepted to main


F r i e n dly Function: A class can have public members and private members.   The public member can be used through the class using dot operator.   Where as private me

Explain structured programming The principal idea behind structured programming was as easy as the idea of "divide and conquer." A computer program could be regarded as having

Protected derivation In addition to doing private and public derivations, you may also do a protected derivation. In this situation :   The private members inherited

wap to count the numof string present in a word

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome