だから、これは私の最初の再帰関数です (私は願っています!) そして、なぜそれが機能しないのかわからない (別名赤い線) アイデアはありますか?
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
}