搜索
查看: 268|回复: 1

变量交换

[复制链接]
 楼主| 发表于 2020-10-26 22:46:24 | 显示全部楼层 |阅读模式
5啊哈币
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main()
  4. {
  5.     int a,b;
  6.     scanf("%d %d",&a,&b);
  7.     a=b-a;
  8.     b=b-a;
  9.     a=a+b;
  10.     printf("%d%d",a,b);
  11.     system("pause");
  12.    
  13.     return 0;
  14. }
复制代码

 楼主| 发表于 2020-10-26 22:47:46 | 显示全部楼层
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main()
  4. {
  5.     int a,b;
  6.     scanf("%d %d",&a,&b);
  7.     a=b-a;
  8.     b=b-a;
  9.     a=a+b;
  10.     printf("%d%d",a,b);
  11.     system("pause");
  12.    
  13.     return 0;
  14. }
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表