Question: Write a program called Lab6 that prompts the user to enter two integers; store these inputs in variables. Then compute the sum and product of
Write a program called Lab6 that prompts the user to enter two integers; store these inputs in variables. Then compute the sum and product of the integers and display the results on the screen by calling two methods. You must write and use the following two methods in your program:
computeSum is a void method that has two int parameters. This method calculates the sum of the two parameters and then displays the sum.
computeProduct is a void method that has two int parameters. This method calculates the product of the two parameters and then displays the product.

| | /1 | -+ Tools Sign Comment Lab 6: Methods Write a program called Lab6 that prompts the user to enter two integers, store these inputs in variables. Then compute the sum and product of the integers and display the results on the screen by calling two methods. You must write and use the following two methods in your program: computeSum is a void method that has two int parameters. This method calculates the sum of the two parameters and then displays the sum. computeProduet is a void method that has two int parameters. This method calculates the product of the two parameters and then displays the product. So your program should get the input from the user, then call the computeSum method (passing the inputs as arguments), and then call the computeProduct method (passing the inputs as arguments) Here are some sample runs (user input is given in) Please enter an integer: Please enter another integer: The sum of your integers is: 0 The product of your integers is: -9 2. Please enter an integer Please enter another integer: The sum of your integers is: 14 The product of your integers is: 45
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
