请问这个比大小的程序,问题出在哪里
#include<stdio.h>void main()
{
int change(int *point1, int *point2);
int a, b;
int *pointer_1, *pointer_2;
printf("请输入两个数值:\n");
scanf_s("%d%d", &a, &b);
pointer_1 = &a;
pointer_2 = &b;
change(pointer_1, pointer_2);
printf("a=%d,b=%d\n", a, b);
printf("max=%d,min=%d\n", *pointer_1, *pointer_2);
getchar();
getchar();
}
int change(int *point1, int *point2)
{
int *p;
if (*point1<*point2)
{
p = point1;
point1 = point2;
point2 = p;
}
return 0;
}
调用函数完成后,但输出的结果是调用函数之前的。麻烦高手指导一下,本人新手。