所以这是我的第一个递归函数(我希望!),我不确定为什么它不起作用,(又名红线)有什么想法吗?
int myFactorial(int C) { //underlined, expects ";"
int n = Integer.parseInt(objectsChooseField.getText());
int r = Integer.parseInt(chooseFromField.getText());
if (C == 1){
return 1; //underlined, cannot return value from method whose result type is void
}
return (C*(myFactorial(n/(r(n-r))))); //underlined
}