<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: C++ programs for sorting a given numbers in ascending order using Merge sort	</title>
	<atom:link href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 26 Mar 2015 11:29:06 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>
		By: jenrick kibet kwambai		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-92316</link>

		<dc:creator><![CDATA[jenrick kibet kwambai]]></dc:creator>
		<pubDate>Thu, 26 Mar 2015 11:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-92316</guid>

					<description><![CDATA[Register to Electrofrinds   Member Login

    Home
    Articles
    Interview Questions
    Projects
    Question and Answer
    Source Codes
    Seminar Resources

studentprojects.in &#062; Source Codes &#062; Software Programs &#062; C++ Programs &#062; Basic Programs &#062; C++ programs for sorting a given numbers in ascending order using Merge sort
C++ programs for sorting a given numbers in ascending order using Merge sort
Share on FacebookTweet about this on TwitterDigg thisPin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on Google+Email this to someone

/* Write C++ programs for sorting a given list of elements in ascending order using Merge sort methods */

#include
#include
using namespace std;
void mergesort(int *,int,int);
void merge(int *,int,int,int);
int a[20],i,n,b[20];
 
main()
{
cout &#060;&#062; n;
cout &#060;&#060;&#034;enter the elements&#034;;
for(i=0;i&#062; a[i];
mergesort(a,0,n-1);
cout &#060;&#060;&#034; numbers after sort&#034;;
for(i=0;i&#060;n;i++)
cout &#060;&#060; a[i] &#060;&#060; &#034; &#034;;
getch();
}
 
void mergesort(int a[],int i,int j)
{
   int mid;
   if(i&#060;j)
   {
      mid=(i+j)/2;
      mergesort(a,i,mid);
      mergesort(a,mid+1,j);
      merge(a,i,mid,j);
   }
}
void merge(int a[],int low,int mid ,int high)
{
   int h,i,j,k;
   h=low;
   i=low;
    j=mid+1;
   while(h&#060;=mid &#038;&#038; j&#060;=high)
   {
      if(a[h] mid)
      for(k=j;k&#060;=high;k++)
	b[i++]=a[k];
   else
      for(k=h;k&#060;=mid;k++)
	 b[i++]=a[k];
 
   cout &#060;&#060;&#034;\n&#034;;
   for(k=low;k&#060;=high;k++)
   {  a[k]=b[k];
     cout &#060;&#060; a[k] &#060;&#060;&#034; &#034;;
   }
 
}]]></description>
			<content:encoded><![CDATA[<p>Register to Electrofrinds   Member Login</p>
<p>    Home<br />
    Articles<br />
    Interview Questions<br />
    Projects<br />
    Question and Answer<br />
    Source Codes<br />
    Seminar Resources</p>
<p>studentprojects.in &gt; Source Codes &gt; Software Programs &gt; C++ Programs &gt; Basic Programs &gt; C++ programs for sorting a given numbers in ascending order using Merge sort<br />
C++ programs for sorting a given numbers in ascending order using Merge sort<br />
Share on FacebookTweet about this on TwitterDigg thisPin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on Google+Email this to someone</p>
<p>/* Write C++ programs for sorting a given list of elements in ascending order using Merge sort methods */</p>
<p>#include<br />
#include<br />
using namespace std;<br />
void mergesort(int *,int,int);<br />
void merge(int *,int,int,int);<br />
int a[20],i,n,b[20];</p>
<p>main()<br />
{<br />
cout &lt;&gt; n;<br />
cout &lt;&lt;&quot;enter the elements&quot;;<br />
for(i=0;i&gt; a[i];<br />
mergesort(a,0,n-1);<br />
cout &lt;&lt;&quot; numbers after sort&quot;;<br />
for(i=0;i&lt;n;i++)<br />
cout &lt;&lt; a[i] &lt;&lt; &quot; &quot;;<br />
getch();<br />
}</p>
<p>void mergesort(int a[],int i,int j)<br />
{<br />
   int mid;<br />
   if(i&lt;j)<br />
   {<br />
      mid=(i+j)/2;<br />
      mergesort(a,i,mid);<br />
      mergesort(a,mid+1,j);<br />
      merge(a,i,mid,j);<br />
   }<br />
}<br />
void merge(int a[],int low,int mid ,int high)<br />
{<br />
   int h,i,j,k;<br />
   h=low;<br />
   i=low;<br />
    j=mid+1;<br />
   while(h&lt;=mid &amp;&amp; j&lt;=high)<br />
   {<br />
      if(a[h] mid)<br />
      for(k=j;k&lt;=high;k++)<br />
	b[i++]=a[k];<br />
   else<br />
      for(k=h;k&lt;=mid;k++)<br />
	 b[i++]=a[k];</p>
<p>   cout &lt;&lt;&quot;\n&quot;;<br />
   for(k=low;k&lt;=high;k++)<br />
   {  a[k]=b[k];<br />
     cout &lt;&lt; a[k] &lt;&lt;&quot; &quot;;<br />
   }</p>
<p>}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Equideow hack		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-33168</link>

		<dc:creator><![CDATA[Equideow hack]]></dc:creator>
		<pubDate>Tue, 07 Oct 2014 14:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-33168</guid>

					<description><![CDATA[Cc moi je peut vous donner des pas et des équss automobile je quitte equideow il vous suffi juste 
d&#039;envoyer votre mdp et pseudo a drogould sur equideow bonne journée Vous voulez hacker equideow alors regardé ma vidéo 
Equus Generator 2014 v1.&quot; Bientôt le jeu Equideow n&#039;aura plus aucune valeur !]]></description>
			<content:encoded><![CDATA[<p>Cc moi je peut vous donner des pas et des équss automobile je quitte equideow il vous suffi juste<br />
d&#8217;envoyer votre mdp et pseudo a drogould sur equideow bonne journée Vous voulez hacker equideow alors regardé ma vidéo<br />
Equus Generator 2014 v1.&#8221; Bientôt le jeu Equideow n&#8217;aura plus aucune valeur !</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mmorpg style manga		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-32452</link>

		<dc:creator><![CDATA[mmorpg style manga]]></dc:creator>
		<pubDate>Sun, 05 Oct 2014 22:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-32452</guid>

					<description><![CDATA[Do you mind if I quote a couple of your articles as long as I 
provide credit and sources back to your webpage?
My website is in the very same niche as yours and my users would genuinely benefit from some of the information you provide here.
Please let me know if this ok with you. Thanks!]]></description>
			<content:encoded><![CDATA[<p>Do you mind if I quote a couple of your articles as long as I<br />
provide credit and sources back to your webpage?<br />
My website is in the very same niche as yours and my users would genuinely benefit from some of the information you provide here.<br />
Please let me know if this ok with you. Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: bankruptcy		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-29036</link>

		<dc:creator><![CDATA[bankruptcy]]></dc:creator>
		<pubDate>Fri, 26 Sep 2014 21:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-29036</guid>

					<description><![CDATA[Hello, I tink your site might be having browser compatibiility issues.
When I look at your blog in Opera, it looks fine but when opening 
in Internet Explorer, it has some overlapping.
I just wanted to gve you a quick heads up! Other then that, fantastic blog!]]></description>
			<content:encoded><![CDATA[<p>Hello, I tink your site might be having browser compatibiility issues.<br />
When I look at your blog in Opera, it looks fine but when opening<br />
in Internet Explorer, it has some overlapping.<br />
I just wanted to gve you a quick heads up! Other then that, fantastic blog!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: http://Www.youtube.com		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-27805</link>

		<dc:creator><![CDATA[http://Www.youtube.com]]></dc:creator>
		<pubDate>Mon, 22 Sep 2014 04:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-27805</guid>

					<description><![CDATA[In Hotline Miami 2, the thought that there are numerous techniques for the story to be interpreted remains true.
That becoming said, he&#039;s being viewed in a quantity of 
ways, and diverse characters and factions are seen reacting to that.]]></description>
			<content:encoded><![CDATA[<p>In Hotline Miami 2, the thought that there are numerous techniques for the story to be interpreted remains true.<br />
That becoming said, he&#8217;s being viewed in a quantity of<br />
ways, and diverse characters and factions are seen reacting to that.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Angeline		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-27372</link>

		<dc:creator><![CDATA[Angeline]]></dc:creator>
		<pubDate>Fri, 19 Sep 2014 22:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-27372</guid>

					<description><![CDATA[My spouse and I absolutely love your blog and find the majority of your post&#039;s to be precisely what I&#039;m looking for.
can you offer guest writers to write content available 
for you? I wouldn&#039;t mind composing a post or elaborating on some of the subjects you write about here.
Again, awesome weblog!]]></description>
			<content:encoded><![CDATA[<p>My spouse and I absolutely love your blog and find the majority of your post&#8217;s to be precisely what I&#8217;m looking for.<br />
can you offer guest writers to write content available<br />
for you? I wouldn&#8217;t mind composing a post or elaborating on some of the subjects you write about here.<br />
Again, awesome weblog!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mosser shoes		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-27298</link>

		<dc:creator><![CDATA[mosser shoes]]></dc:creator>
		<pubDate>Fri, 19 Sep 2014 10:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-27298</guid>

					<description><![CDATA[6% in champaign shoes 2012, at White Rock Lake. This may allow for fluid motion. Our corporate tax rate was 30 and 40 stores 
opened during the 2014 FIFA World Cup football match between Chile 
and Australia at Arena de Sao Paulo, Brazil.]]></description>
			<content:encoded><![CDATA[<p>6% in champaign shoes 2012, at White Rock Lake. This may allow for fluid motion. Our corporate tax rate was 30 and 40 stores<br />
opened during the 2014 FIFA World Cup football match between Chile<br />
and Australia at Arena de Sao Paulo, Brazil.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: michael		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-9569</link>

		<dc:creator><![CDATA[michael]]></dc:creator>
		<pubDate>Sun, 03 Mar 2013 17:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-9569</guid>

					<description><![CDATA[can someone explain the part of the wherein there are two the same functions inside the very own function? the mergesort function]]></description>
			<content:encoded><![CDATA[<p>can someone explain the part of the wherein there are two the same functions inside the very own function? the mergesort function</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: vinothini		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-9126</link>

		<dc:creator><![CDATA[vinothini]]></dc:creator>
		<pubDate>Sun, 28 Oct 2012 16:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-9126</guid>

					<description><![CDATA[it s very usefull prg]]></description>
			<content:encoded><![CDATA[<p>it s very usefull prg</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ankita		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-basic/c-programs-for-sorting-a-given-numbers-in-ascending-order-using-merge-sort/comment-page-1/#comment-8887</link>

		<dc:creator><![CDATA[ankita]]></dc:creator>
		<pubDate>Thu, 13 Sep 2012 08:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1038#comment-8887</guid>

					<description><![CDATA[lots of error occur when we compile the program]]></description>
			<content:encoded><![CDATA[<p>lots of error occur when we compile the program</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
