FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 6   



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.in);

        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);

    }

}

Output:

Enetr first number:
10
Enetr second number:
20
Multiplication of given two numbers is: 200



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News