#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
推
220.135.213.145 07/03, , 1F
220.135.213.145 07/03, 1F
推
218.35.186.6 07/03, , 2F
218.35.186.6 07/03, 2F
推
218.166.130.178 07/03, , 3F
218.166.130.178 07/03, 3F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 3 篇):
問題
3
3