Youth is a beautiful but also a time to go, it is the beginning of all the bright and happy in the future.
青少年是一个美好而又是一去不可再得的时期,是将来一切光明和幸福的开端。
任务:不用第三个变量,实现将两个数进行对调的操作。
输入:3 4
输出:
a=3 b=4
a=4 b=3
源代码:
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d%d",&a,&b);
printf("a=%d b=%d\n",a,b);
printf("a=%d b=%d\n",b,a);
return 0;
}
运行结果: