将a和b交换的3种方法
来源:互联网 发布:疯狂美工助手打不开 编辑:程序博客网 时间:2024/05/22 03:53
方法1
#include <stdio.h>int main(){int a,b;int c;scanf("%d%d",&a,&b);c=a;a=b;b=c;printf("%d%d",a,b);return 0;}
方法2
#include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);a=a+b;b=a-b;a=a-b;printf("%d%d\n",a,b);}方法3
#include <stdio.h>int main(){int a,b;scanf("%d%d",&a,&b);printf("%d%d",b,a);return 0;}
0 0
- 将a和b交换的3种方法
- 交换a和b的方法讲解
- swap(a,b)值交换的4种方法
- swap(a,b)值交换的4种方法
- 交换A与B值的四种方法
- 交换变量a ,b值的三种方法
- 交换a和b...
- 交换a和b
- 不借助其他变量,将变量a和b交换
- 把a 和b的值交换
- 将a与b的值进行交换
- C/C++用多种方法交换两个数a和b的值
- 用PHP写一段代码,实现不使用第3个变量,交换$a、$b的值,$a、$b的初始值自己定。(五种方法实现)
- 不用额外空间来交换 a b 值的方法
- A值与B值的交换方法
- 两个变量a,b交换值的方法
- 4.2.编程从键盘输入两个整数分别给变量a, b, 要求在不借助于其它变量的条件下将变量a和b的值实现交换。
- 交换a,b的值
- Little Elephant and Array - CodeForces 220 B 树状数组
- on_exit()函数使用说明
- 司的法规司的法规司的法规
- stl_slist.h
- Android_ArrayAdapter文字排列_141002
- 将a和b交换的3种方法
- NYOJ 题目291 LK的数学题(欧拉函数)
- stl_heap.h
- Alternative Scale of Notation(大数java)
- atexit()函数使用说明
- stl_tree.h
- hdu 2255 奔小康赚大钱(二分图的最优匹配)
- 简单的MySQL数据库主从同步配置
- _exit()函数使用说明