#include<stdio.h>
int main()
{
int a, b, * p1, * p2,t=0;
printf("请输入两个数:");
scanf("%d,%d", &a, &b);
p1 = &a; p2 = &b;
if (a < b)
{
t =*p1 ;
*p1 = *p2;
*p2 = t;
}
printf("%d %d", a, b);
}
#include<stdio.h>
int main()
{
int a, b, * p1, * p2,t=0;
printf("请输入两个数:");
scanf("%d,%d", &a, &b);
p1 = &a; p2 = &b;
if (a < b)
{
t =*p1 ;
*p1 = *p2;
*p2 = t;
}
printf("%d %d", a, b);
}