this function works without any return type. But how that's my question....
void factorial(int i_value){ int fact=1,j; for(int j=2*i_value-1;j>=1;j--){ fact=fact*j; } }
what are you want to return?
perhaps the fact
int factorial(int i_value){
int fact=1,j;
for(int j=2*i_value-1;j>=1;j--){
fact=fact*j;
}
return fact;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.