Community Sites
Create your own community website and start earning today !
It's Free !
 
Communities Members BookmarksPolls Fresher Jobs Funny Pictures MCA Projects New Member FAQ  



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter




C++ PROGRAM FOR SEQUENTIAL SEARCH


Posted Date: 16 Mar 2008    Resource Type: Articles/Knowledge Sharing    Category: Computer & Technology

Posted By: ashish singh       Member Level: Diamond
Rating:     Points: 2



PROGRAM FOR SEQUENTIAL SEARCH

//sequential search
#include
void main()
{
int arr[25];
int n,item;
cout<<"How many element you want to enter in array:";
cin>>n;
for(int i=0;i {
cout<<"enter the element "< cin>>arr[i];
}
cout<<"Enter the no. you want to search: ";
cin>>item;
for(i=0;i {
if(arr[i]==item)
{
cout< break;
}
}
if(i==n)
cout<
}

Output:

How many element you want to enter in array:5
enter the element 1:10
enter the element 2:25
enter the element 3:7
enter the element 4:12
enter the element 5:100
Enter the no. you want to search:12
12 found at position 4
Press any key to continue




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: C++ PROGRAM FOR DEMONSTRATION OF DEFAULT VALUE ARGUMENT
Previous Resource: C++ PROGRAM FOR SWAPPING USING FRIEND FUNCTION
Return to Discussion Resource Index
Post New Resource
Category: Computer & Technology


Post resources and earn money!
 
Related Resources

Watch TV Channels



Contact Us    Editors    Privacy Policy    Terms Of Use   

SpiderWorks Technologies Pvt Ltd. 2006 - 2007 All Rights Reserved.