011-001-007
コンストラクタ定義:商品情報
初級
問題説明
テストケース例
※ 出力例はプログラミングの国際標準に準拠し英語で表示しています
入力:
Apple 100 3
期待される出力:
Product: Apple Unit price: 100 yen Quantity: 3 items Total: 300 yen
入力:
Banana 150 2
期待される出力:
Product: Banana Unit price: 150 yen Quantity: 2 items Total: 300 yen
入力:
A 1 1
期待される出力:
Product: A Unit price: 1 yen Quantity: 1 items Total: 1 yen
入力:
Banana 200 5
期待される出力:
Product: Banana Unit price: 200 yen Quantity: 5 items Total: 1000 yen
❌ テストに失敗したケースがあります
あなたの解答
現在のモード:● 自分のコード
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// ここにコードを書いてください
sc.close();
}
}
0 B / 5 MB
残り 8 回実行可能
