请问这步哪错了,不能运行,谢谢啦!
#include <stdio.h>#include <stdlib.h>
int main(void)
{
int *p;
int i,j;
int n;
int temp;
scanf("%d",&n);
p = (int *)malloc(sizeof(int)*n);
for(i=0;i<n;i++)
{
scanf("%d",(p+i));
}
for(j = 1;j <= n- 1;j++)
{
for(i = 0;i < n - j;i++)
{
if(p > p+1)
{
temp = p;//??????????????
p = p+1;
p+1 = temp;
}
}
}
for(i = 0;i < n;i++)
{
printf("%d\n",p);
}
return 0;
}
显示这个 [Error] lvalue required as left operand of assignment
[此贴子已经被作者于2016-6-2 00:43编辑过]