セクション 6. 章 4
single
Challenge: Methods Creation
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
You run a small store. Each order has a fixed price per item and quantity. Your task is to calculate the total price using a separate method.
- Create a method (
CalculateTotalPrice) that:- Does not take any parameters.
- Uses hardcoded values for
itemPriceandquantity. - Calculates the total price as
itemPrice * quantity. - Print the result using
Console.WriteLine
- In
Main, call this method.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 6. 章 4
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください