#includevoid main() { int x, y, t;//需要引入一个中间量t,把一个值保存下来,以免丢失 printf("请输入两个数字:"); scanf_s("%d%d",&x,&y); if (x > y) printf("x=%d,y=%d", x, y); else { t = x; x = y; y = t; printf("x=%d,y=%d", x, y); system("pause"); } }
欢迎分享,转载请注明来源:内存溢出
#includevoid main() { int x, y, t;//需要引入一个中间量t,把一个值保存下来,以免丢失 printf("请输入两个数字:"); scanf_s("%d%d",&x,&y); if (x > y) printf("x=%d,y=%d", x, y); else { t = x; x = y; y = t; printf("x=%d,y=%d", x, y); system("pause"); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)