current position:Home>Solve, why can't this work

Solve, why can't this work

2022-02-02 21:48:25 CSDN Q & A

img




Refer to the answer 1:
int sum(int x){if (x < 2){    return 1;}else{    return sum(x -1)) + sum(x-2);}}



Refer to the answer 2:



Refer to the answer 3:

return 1;




Refer to the answer 4:



Refer to the answer 5:

Upstairs Big banyan tree 51 Your answer is right

Functions cannot be = The assignment of , This should be the return value , use return keyword




Refer to the answer 6:



Refer to the answer 7:

sum(x) Is the function , Function cannot be assigned




Refer to the answer 8:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022148236494.html

Random recommended