交换两个变量的值

#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> //写一个无返回值的函数exchange void exchange(int x, int y) { int t; //定义中间变量t t = x; //把x的值赋给t x = y; //把y的值赋给x y = t; //把t的值赋给y } in
相关文章
相关标签/搜索