تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - جستجوی خطی با آرایه
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر takcoder.ir


آموزش برنامه نویسی با استفاده از نوین ترین روش و ارائه پروژه های نمونه و مجموعه عظیم سورس کدهای آماده برای شما دوستان

مدیر سایت : Yahya Taherzadeh
نویسندگان
نظرسنجی
زبان برنامه نویسی مورد علاقه شما؟






سلام دوستان عزیز

برای شما جستجوی خطی با آرایه را می گذارم، این سورس کد  که به زبان سی پلاس پلاس نوشته شده است در واقع سورس الگوریتم جستجوی خطی می باشد.

#include<iostream.h>
#include<conio.h>

int lsearch(int Arr[], int s, int VAL);

int main()
{
int Arr[100],n,val,found;
cout<<”Enter number of elements you want to insert “;
cin>>n;
for(int i=0;i<n;i++)
{
cout<<”Enter element “<<i+1<<”:”;
cin>>Arr[i];
}

cout<<”Enter the number you want to search “;
cin>>val;

found=lsearch(Arr,n,val);

if(found==1)
cout<<”\nItem found”;
else
cout<<”\nItem not found”;

getch();
return 0;
}

int lsearch(int Arr[], int s, int VAL)
{
for(int I=0; I<s; I++)
{
if(Arr[I]==VAL)
return 1;
}
return 0;
}





نوع مطلب : آموزش، پروژه های رایگان، سی| سی پلاس پلاس، پروژه های تکمیل شده، 
برچسب ها : جستجوی خطی با آرایه، جستجوی خطی با آرایه در سی پلاس، سی پلاس، دانلود رایگان کد، کدهای، کدهای آماده برنامه نویسی، دانلود مطالب برنامه نویسی،
لینک های مرتبط :
Yahya Taherzadeh
چهارشنبه 20 آذر 1392
سه شنبه 17 مرداد 1396 07:02 ق.ظ
Right away I am going away to do my breakfast, once having my breakfast coming again to read
further news.
دوشنبه 12 تیر 1396 08:47 ب.ظ
Hello my loved one! I wish to say that this post is amazing,
nice written and include almost all important infos.

I'd like to see more posts like this.
یکشنبه 11 تیر 1396 06:43 ق.ظ
Inspiring story there. What happened after?
Thanks!
شنبه 3 تیر 1396 03:51 ب.ظ
Good day very nice web site!! Guy .. Excellent
.. Superb .. I will bookmark your website and take the feeds
also? I'm glad to seek out numerous useful information right here in the
publish, we'd like develop more strategies in this regard, thank you for sharing.
. . . . .
چهارشنبه 31 خرداد 1396 05:58 ب.ظ
This is the right web site for everyone who would like to understand this topic.
You know a whole lot its almost tough to argue with you (not that I really would
want to?HaHa). You definitely put a fresh spin on a topic which
has been written about for many years. Great stuff, just excellent!
یکشنبه 24 اردیبهشت 1396 03:30 ب.ظ
Hello! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche.
Your blog provided us useful information to work on.
You have done a marvellous job!
شنبه 16 اردیبهشت 1396 09:21 ب.ظ
Undeniably believe that which you stated.
Your favorite justification seemed to be at the internet the easiest factor to
keep in mind of. I say to you, I definitely get annoyed whilst folks think about issues that they plainly do not
recognize about. You controlled to hit the nail upon the highest and defined out the whole thing without having side effect , people
can take a signal. Will probably be back to get more.
Thank you
چهارشنبه 13 اردیبهشت 1396 06:50 ب.ظ
What's up every one, here every one is sharing these knowledge, thus it's nice to read this webpage, and I used to
go to see this website daily.
چهارشنبه 13 اردیبهشت 1396 05:54 ب.ظ
I every time spent my half an hour to read this web site's articles or reviews every day along with a mug of coffee.
یکشنبه 27 فروردین 1396 11:27 ب.ظ
I was curious if you ever considered changing the layout of your website?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content
so people could connect with it better. Youve got an awful
lot of text for only having 1 or 2 pictures. Maybe
you could space it out better?
جمعه 25 فروردین 1396 07:43 ب.ظ
hello there and thank you for your information –
I have definitely picked up anything new from
right here. I did however expertise several technical issues using this site, since I experienced to reload the
site a lot of times previous to I could get it to load properly.
I had been wondering if your hosting is OK? Not that I'm complaining, but slow loading instances
times will often affect your placement in google and could damage your quality score if
ads and marketing with Adwords. Well I am adding this
RSS to my email and could look out for much more of your respective intriguing content.
Make sure you update this again very soon.
جمعه 18 فروردین 1396 06:10 ب.ظ
For most up-to-date information you have to go to see web and on the web I
found this website as a best site for most recent updates.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر




صفحات جانبی
آمار وبلاگ
تاییدیه پرداخت
تبلیغات
به سایت تک کدر خوش آمدید