不使用第3个变量,实现两个数的对调
小Bob 小Bob Bob来啦
2020年04月26日 23:30 __ _ _ _ _

**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; }
运行结果:


往期推荐:
刷路由,你会玩么?(一) 2020-04-23
刷新路由3的那些事(二) 2020-04-24
关于路由的其他功能(剧终) 2020-04-25
公众号:程序员Bob
一个正在学习C语言的人,致力于将C讲得更透彻!
点赞关注谢谢你
长按下图二维码关注,和你一起领悟程序员的魅力。

点“ 在看 ” 你懂得

预览时标签不可点
阅读
__
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 小Bob的博客!











