【求助】看看哪里错了
#include<stdio.h>
#include<string.h>
#define N 10
#define M 3
void main()
{
char str[M][N]={"China","Australia","Canada"};
int j,s=0;
for(j=0;j<3;j++)
if(strcmp(str[j][N],str[j+1][N])>0)
{s=str[j][N];str[j][N]=str[j+1][N];str[j+1][N]=s;}
for(j=0;j<3;j++)
puts(str[j][N]);
}
[此贴子已经被作者于2007-11-18 8:01:25编辑过]