void main()
{
const V=10;
int a[V];
int i,j,x;
printf("PROGRAM ASCENDING \n");
//----------Be4 Sorting
printf("\nData be4 disorting\n\n");
//-------------Input data
for(i=0;i<=V-1;i++)
{
printf("Data integer a[%d] :",i);scanf("%d",&a[i]);
}
//----------sorting process
for(i=0;i<=V-2;i++)
{
for(j=i+1;j<=V-1;j++)
{
if (a[i]>=a[j])
{
x=a[i];
a[i]=a[j];
a[j]=x;
}
}
}
//----------after sorting
printf("\nData after sorting\n\n");
for(i=0;i<=V-1;i++)
{
printf("\nData at a[%d] : %d",i,a[i]);
}
printf("\n\nfinish ");
}
ini teknik sorting apa??
BalasHapuskarena ada beberapa teknik sorting, seperti bubble sorting, dll.
mohon dijelaskan lah suhu. . .