#include <stdio.h> void apple (int u,int v); int main(void) { int x=5,y=10; printf("x1=%d y1=%d.\n",x,y); apple(x,y); printf("x2=%d y2=%d.\n",x,y); return 0; } void apple (int u,int v) { int temp; temp=u; u=v; v=temp; }
时间: 2024-10-01 05:02:18
#include <stdio.h> void apple (int u,int v); int main(void) { int x=5,y=10; printf("x1=%d y1=%d.\n",x,y); apple(x,y); printf("x2=%d y2=%d.\n",x,y); return 0; } void apple (int u,int v) { int temp; temp=u; u=v; v=temp; }