宇航员.
宇航员.
全部文章
题解
归档
标签
去牛客网
登录
/
注册
宇航员.的博客
全部文章
/ 题解
(共2篇)
题解 | #编写函数实现两数交换(指针方式)#
```void sort(int *array,int n) //冒泡排序法 { for(int i=0;i<n-1;i++) { for(int j=0;j<n-i-1;j++) { if(array[j]>...
C++
2022-03-30
1
292
题解 | #编写函数实现两数交换(指针方式)#
#include using namespace std; // write your code here void swap(int *a,int *b)//形参定义为指向a,b的指针 { //定义一个参数来交换a,b所指向的数值 int t=*a; *a=*b; *b=t; } int ma...
C++
2022-03-30
1
312