Write Java program to multiply two numbers and print the product
Answers
Answered by
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
0
Answer:
isme sorry ka kya bat hai yrr
Similar questions
India Languages,
2 months ago
Social Sciences,
2 months ago
English,
2 months ago
Hindi,
4 months ago
Hindi,
4 months ago
Math,
9 months ago