セクション 3. 章 2
single
Challenge: Pure Function Practice
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Write a method CalculateFactorial that calculates the factorial of a given integer in a pure manner. The function must not cause any side effects and should only depend on its input.
- Return the correct factorial value for non-negative integer input.
- Throw an
ArgumentExceptionif the input is negative. - Ensure the method does not read from or modify any external state.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください