Computer Science, asked by technoshark510, 4 months ago

Write Java program to multiply two numbers and print the product

Answers

Answered by BrainlyProgrammer
3

Question:-

Print the product of two numbers

Answer:-

import java.util.*;

class Code

{

public static void main (String ar[])

{

Scanner sc=new Scanner (System.in);

System.out.println("Enter 2 number");

a=sc.nextInt();

b=sc.nextInt();

System.out.println("Product of "+a+" and "+b+" is "+(a*b));

}

}

}

___

Output:-

Enter 2 numbers

2

3

Product of 2 and 3 is 6

__

Explaination:-

let's Accept a as 2 and b as 3

product will be 6

.

.

so output:

Product of 2 and 3 is 6

Answered by akshara129
0

Answer:

isme sorry ka kya bat hai yrr

Similar questions