Java

Program to implement product of two numbers.

Program to implement product of two numbers.
import java.util.Scanner;
 
public class demo1 {
 
 public static void main(String[] args) {
  Scanner in = new Scanner(System.in);
   
  System.out.print("Input first number: ");
  int num1 = in.nextInt();
   
  System.out.print("Input second number: ");
  int num2 = in.nextInt();
   
  System.out.println(num1 + " x " + num2 + " = " + num1 * num2);
 }
 
}
Nikhil Juneja

Passionate software developer and technical contributor at TutorialsLink.