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
Produce a pseudo code to be used for development compute and display some data on the bounces a ball will make when dropped from a given height. To simplify the problem, you ass

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

Your task in this project is to write a C program named layout.c which does text layout. This is a staged project, complete the stages in order. The maximum mark if you nish each

1. Create text a file with the name "myemail" that has a single line in it, consisting of your email address. Something like "firstname_lastname@carleton.ca" (or your hotmail or gm

The task consists of two parts which are both preferably implemented in one source file. Towards the end of this document you will find a code skeleton that you must assume. Start

Why are all header files not declared in every C program? - Declaring all header files in each program would result in increase in overall file size and load of the program. It

Describe spaghetti programming. - Spaghetti programming refers to codes which tend to get tangled and overlapped throughout the program. - It makes a program complex and ana

Program is to read the characters from keyboard: Program is to read the characters from keyboard one by one stored in different files as upper constants, lower constants, othe

how to do 2, 4, 8 associativity

Can you help me with a C++ project?