作者hicoy ()
站内TransCSI
标题[问题] 一题程式
时间Sun Jul 3 14:23:33 2005
#include<stdio.h>
void somefunction(const int b[],int c);
int main(){
int a[]={1,3,5,7,9,11};
somefunction(a,5);
return 0;
}
void somefunction(const int b[],int c){
if(c>0){
somefunction(&b[1],c-1);
printf("%d\n",b[0]);
}
}
请问一下答案
这是我做出来的不过我不确定
9
7
5
3
1
请问这样对吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.166.129.192
1F:推 E9E7:我跑出来跟你写的一样,应该对了吧^^"220.135.213.145 07/03
2F:推 neutronstars:这是考古题吗?我觉得这题还满有趣的~ 218.35.186.6 07/03
3F:推 hicoy:这是台联大93年计概题目218.166.130.178 07/03