Hello, I'm new to this website, and new to programming.
I'm trying to write a simple code that will multiply height and width(Excuse my English, It's not my native language)
But I'm getting the error "The operator * is undefined for the argument"
Here's my code
Any suggestions?
I'm trying to write a simple code that will multiply height and width(Excuse my English, It's not my native language)
But I'm getting the error "The operator * is undefined for the argument"
Here's my code
import java.util.Scanner; class Calc { public static void main(String args[]){ double answer; System.out.println(" enter width"); Scanner width1 = new Scanner(System.in); System.out.println("enter height"); Scanner height1 = new Scanner(System.in); answer = height1 * width1; } }
Any suggestions?