使用函数实现两个数的交换。
来源:互联网 发布:cf占卜软件 编辑:程序博客网 时间:2024/04/27 23:45
//2.使用函数实现两个数的交换。
#include<stdio.h>
int swap(int *px, int *py)
{
int temp = 0;
temp = *px;
*px = *py;
*py = temp;
printf("a=%d,b=%d",*px,*py);
}
int main()
{
int a = 20;
int b = 0;
swap(&a, &b);
system("pause");
return 0;
}
#include<stdio.h>
int swap(int *px, int *py)
{
int temp = 0;
temp = *px;
*px = *py;
*py = temp;
printf("a=%d,b=%d",*px,*py);
}
int main()
{
int a = 20;
int b = 0;
swap(&a, &b);
system("pause");
return 0;
}
0 0
- 使用函数实现两个数的交换。
- 使用函数实现两个数的交换;
- 使用函数实现两个数的交换。
- 使用函数实现两个数的交换
- 使用函数实现两个数的交换。
- 使用函数实现两个数的交换。
- 使用函数实现两个数的交换。
- 使用函数实现两个数的交换
- 使用函数实现两个数的交换
- 使用函数实现两个数的交换
- C语言 使用函数实现两个数的交换
- C语言-使用函数实现两个数的交换
- 用函数实现两个数的交换
- 函数实现两个数的交换
- 函数实现两个数交换
- 实现两个数的交换
- 【面试题】C语言:使用函数实现两个数的交换
- 用函数和指针实现两个数的交换
- C#简单工厂和抽象类的实例
- 实现一个函数判断year是不是润年。
- PTA 5-1 List Components (25分)
- 【HTTP】单点登录原理与简单实现
- pycaffe的小问题- -
- 使用函数实现两个数的交换。
- iOS运行某些工程时屏幕上下出现黑边的解决办法
- Shiro-Realm
- Thinkphp5因xdebug配置不当报错
- ListView_SetView宏,发送LVM_SETVIEW;ComboBox;ComboBox_AddString;CBN_SELCHANGE CB_GETCURSEL;ImageList_Cr
- python
- U3D Sprite Manager 2D动画
- //1.实现一个函数,打印乘法口诀表,口诀表的行数和列数自己指定, //输入9,输出9 * 9口诀表,输出12,输出12 * 12的乘法口诀表。
- 安卓项目SimpleQQ——QQ空间说说时光轴设计