#include <stdio.h>
#include <stdlib.h>
int main()
{
int num1,num2;
int *num1_p=&num1,*num2_p=&num2,*pointer;
printf("Input the first number:");
scanf("%d",num1_p);
printf("Input the second number:");
scanf("%d",num2_p);
printf("num1=%d,num2=%d\n",num1,num2);
if(*num1_p>*num2_p)
{
pointer=num1_p;
num1_p=num2_p;
num2_p=pointer;
}
printf("min=%d,max=%d",*num1_p,*num2_p);
return 0;
}
时间: 2024-10-27 18:54:45