未知题型

下列函数invert()的功能是:将数组a中n个元素逆序存放;请填空。

??#include
??#define N 10
??void invert(int a[],int n)
??{?int i=0,j=n-1-i;
???while(______)
???{int t;
????t=a[i]______;a[j]=t;
????i++;
???______;
???}
??}
【参考答案】

填空部分应填入以下内容:1. 第一个空白处应填入 `i < j`,因为这是循环继续的条件,即当 `i` 小于 `j` 时......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)