004-008-006
Multidimensional Array: Weekly Menu Table
Easy
Problem Description
Multidimensional Array: Weekly Menu Table
Learning Objective: Create 2D string array and store data
Manage weekly menu table. Create 2D array to record menus by combination of day and meal time (breakfast, lunch, dinner).
Test Cases
※ Output examples follow programming industry standards
Input:
2 Bread Salad Curry Rice Ramen Sushi
Expected Output:
=== Weekly Menu === Day 1: BreakfastBread LunchSalad DinnerCurry Day 2: BreakfastRice LunchRamen DinnerSushi Total: 2 days, 6 meals
Input:
1 Toast Soup Steak
Expected Output:
=== Weekly Menu === Day 1: BreakfastToast LunchSoup DinnerSteak Total: 1 days, 3 meals
Input:
3 A B C D E F G H I
Expected Output:
=== Weekly Menu === Day 1: BreakfastA LunchB DinnerC Day 2: BreakfastD LunchE DinnerF Day 3: BreakfastG LunchH DinnerI Total: 3 days, 9 meals
❌ Some tests failed
Your Solution
Current Mode:● My Code
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);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 9 free executions remaining
