001-004-006
Variable Value Update: Cooking Time Record
Easy
Problem Description
variable Value Update: Cooking Time Record
In this problem, you will create a program that reads three integer inputs, incrementally updates a variable to accumulate cooking time across preparation and two cooking steps, and displays the formatted result to standard output.
Learning Objective: Understand how to update variable values step by step
Create a recipe app. Input preparation time first, then add time for two cooking steps. Display cumulative time after each step.
Input
Line 1: Preparation time (integer, minutes)
Line 2: First cooking step time (integer, minutes)
Line 3: Second cooking step time (integer, minutes)
Output
================================
Cooking Time Record
================================
Preparation: [time] min
After Step 1: [cumulative time] min
After Step 2: [total time] min
================================
```java
## Examples
### Example 1: 10min prep, 15min stir-fry, 20min simmer
Input:
```java
10
15
20
```java
Output:
```java
================================
Cooking Time Record
================================
Preparation: 10 min
After Step 1: 25 min
After Step 2: 45 min
================================
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up