008-001-006

Method Definition: Sum Calculation Method

Easy

Problem Description

method Definition: Sum Calculation method

In this problem, you will create a program that defines a sum method accepting two integers and returning their total, then displays the return value to standard output.

Learning Objective: Define and call method with return value

Create method that calculates sum of two numbers. Define sum method, return and display result.

Input

Line 1: Number 1 (integer)
Line 2: Number 2 (integer)

Output

Sum: [result]

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