题目内容
下面程序的功能是将字符数组a中下标值为偶数的元素从小到大排列,其他元素不变,请填空。
include<iostream.h>
include<string.h>
void main()
{ char a[ ] ="clanguage", t;
int I ,j, k;
k=strlen(a) ;
for(i=0;i<=k-2;i+=2)
for(j=i+2;j<=k; _____)
if(_____)
{ t=a[i] ;a[i] =a[j] ;a[j] =t; }
cout < < a;
cout < < endl;}
查看答案
搜索结果不匹配?点我反馈