セクション 6. 章 12
single
Challenge: Scopes
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
You want to calculate total sales for a day using local and global variables.
- Declare a global variable
grandTotal(outside any method) to store the total sales. - Create a method
AddSalethat:- Declares local variables
priceandquantity. - Calculates the total for that sale and adds it to the global
grandTotal.
- Declares local variables
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 6. 章 12
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください