Question: I am trying to work out this program in which you are supposed to Calculate and print out the multiplication and Use three methods: userInput(),

I am trying to work out this program in which you are supposed to Calculate and print out the multiplication and Use three methods: userInput(), calculation(), printout().

package com.practice3; import java.util.Scanner;

public class Main {

static void userInput(){

double num1; double num2;

Scanner input = new Scanner(System.in); System.out.print("Enter your first number"); num1 = input.nextDouble(); System.out.print("Enter your secound number"); num2 = input.nextDouble(); } static void calculation(double num1, double num2 , double result){

userInput(); result = num1 * num2;

} static void printout(double num1, double num2 , double result){ calculation();

System.out.print(num1+ " x " + num2 +" = " + result );

}

static void main(String[] args) {

calculation(); printout(); } }

When running the program it gives me these location errors

I am trying to work out this program in which you are

Is there anyway to fix this?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!