#include
const int RowNum = 3;
const int ColumnNum = 3;
void BubbleSort(int Array[RowNum][ColumnNum]);
int main()
{
int i = 0,j = 0;
int Array[RowNum][ColumnNum];
for (i=0;i
for (j=0;j
scanf("%d",&Array[i][j]);
}
}
printf("输入的数组如下:\n");
for (i=0;i
for (j=0;j
printf("%d ",Array[i][j]);
}
printf("\n");
}
BubbleSort(Array);
printf("行排序后的数组如下:\n");
for (i=0;i
for (j=0;j
printf("%d ",Array[i][j]);
}
printf("\n");
}
return 0;
}
void BubbleSort(int Array[RowNum][ColumnNum])
{
int Temp = 0;
for (int i=0;i
for (int j=0;j
for(int k=j+1;k
if (Array[i][j] > Array[i][k])
{
Temp = Array[i][j];
Array[i][j] = Array[i][k];
Array[i][k] = Temp;
}
}
}
}
}
#include
const int row=10;
const int col=10;
void main()
{
int i=0,j=0,k=0,temp=0;
int a[row][col];
for(i=0;i
for(i=0;i
for(j=0;j
for(k=j+1;k
if(a[i][j]>a[i][k])
{
temp=a[i][j];
a[i][j]=a[i][k];
a[i][k]=temp;
}
}
}
}
}