Computer Science, asked by nitikaaggarwal122, 1 day ago

develop a java program to accept two numbers from user and display product of two numbers when user press multiply button.

Answers

Answered by brainly10038
1

\large{\underline{\underline{\maltese{\orange{\pmb{\sf{ \; Question \; :- }}}}}}}

Develop a java program to accept two numbers from user and display product of two numbers when user press multiply button.

\large{\underline{\underline{\maltese{\orange{\pmb{\sf{ \; Answer \; :- }}}}}}}

import java.util.Scanner;

public class Javaexcercise{

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

System.out.print("Input 1st number: ");

int number1 = in.nextInt();

System.out.print("Input 2nd number: ");

int number2 = in.nextInt();

System.out.println("Product of two numbers: "+ number1 + " x " + number2 + " = " + number1 * number2);

}

}

Similar questions