008-006-005

Method Return Value: Total Cooking Time

Easy

Problem Description

method Return Value: Total Cooking Time

In this problem, you will create a program that defines a method receiving three cooking step times as arguments, returns their sum using a return statement, and displays the result to standard output.

Learning Objective: Understand mechanism where method returns calculation result

Calculate total cooking time for recipe. Create method that receives three cooking step times as arguments and returns total time with return statement.

Input

Line 1: Step 1 time (minutes)
Line 2: Step 2 time (minutes)
Line 3: Step 3 time (minutes)

Output

=== Total Cooking Time ===
Step 1: [time1] minutes
Step 2: [time2] minutes
Step 3: [time3] minutes
━━━━━━━━━━━━━━━━
Total: [total] minutes

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