#include<stdio.h> main() { int x,y,t; printf("enter x&y:\n"); scanf("x=%d y=%d\n",x,y); t=x;x=y;y=t; printf("x=%d y=%d\n",x,y); } scanf("x=%d y=%d\n",x,y); 改成scanf("x=%d y=%d\n",&x,&y);