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
My file pointer is going to the location which i specified and writing the value but it is in next line so,please help me iam developing in visual studio6

What if one forget the [] when deleteing array allocated through new T[n]? A: All life comes to a disastrous end. It is the programmer's responsibility not the compiler's to

padovan string problem program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d

Question A bank normally updates it's clients accounts at the end of each month.Of the two types of bank accounts:savings and checking, a client must maintain a minimum balance


write a program to find the area under the curve y=f(x) between x=a & x=b

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

Should I explicitly call a destructor on a local variable? Explain it.

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim