#include <stdio.h> #include <stdlib.h> int main() { int a, b; int change_num(int a, int b);//聲明change_num函數 printf("please enter two numbers:"); scanf("%d,%d", &a, &b); change_num(&a,&b);//調用change_num函數 printf("%d %d\n", a, b); system("pause"); return 0; } int change_num(int *px, int *py)//定義change_num函數 { int temp; temp = *px; *px = *py; *py = temp; }