今天打卡章节是《C语言入门100例》(第3例) 交换变量;
附上链接:https://blog.csdn.net/WhereIsHeroFrom/article/details/118208316
目录
主要知识点
给定 a 和 b ,交换它们的值并输出 | 四种解法
解法一:引入临时变量
#include <stdio.h>
int main() {
int a, b, tmp;
while (scanf("%d %d", &a, &b) != EOF) {
tmp = a;
a = b;
b = tmp;
printf("%d