Java program to multiply given two numbers

Views: 1   

Following program shows you how to multiply given two numbers.
In this program we get inputs from user and multiplies those two inputs

import java.util.Scanner;

public class BasicMath6 {

    public static void main(String[] args) {

        int input1;
        int input2;

        Scanner in = new Scanner(;

        System.out.println("Enetr first number:");
        input1 = in.nextInt();

        System.out.println("Enetr second number:");
        input2 = in.nextInt();

        int result = input1 * input2;

        System.out.println("Multiplication of given two numbers is: " + result);




Enetr first number:
Enetr second number:
Multiplication of given two numbers is: 200
On By