What's new

Closed Merge sort

Status
Not open for further replies.

godlike_pong

Eternal Poster
Joined
Feb 9, 2017
Posts
380
Reaction
311
Points
257
Age
7
8,4,2,1,5,7,3,6 sample yan po ang given arrays...... pa help naman po paanu to gawan ng c++ program...

ty po sa makakatulong..
 
gawa ka lang ng dalawang function na mag me-merge at mag split, okay na un
#include<stdio.h>
#include<conio.h>
void merge(int [],int ,int ,int );
void part(int [],int ,int );
int main()
{
int arr[30];
int i,size;
printf("\n\t––––––– Merge sorting method –––––––\n\n");
printf("Enter total no. of elements : ");
scanf("%d",&size);
for(i=0; i<size; i++)
{
printf("Enter %d element : ",i+1);
scanf("%d",&arr);
}
part(arr,0,size–1);
printf("\n\t––––––– Merge sorted elements –––––––\n\n");
for(i=0; i<size; i++)
printf("%d ",arr);
getch();
return 0;
}
ito papz... pa help mag pa flow chart nito..
 
i see, di ko forte pag flow chart design. jan din ako nahirapan dati eeh. sorry TS

tanongin mo na lang ung google bka may idea sya .
 
Status
Not open for further replies.

Similar threads

Back
Top