wap in java to find product of three no
Answers
Answered by
0
Answer:
Hy mate your answer is here.
Explanation:
Please follow me and mark me as a brainlist answer. Please.
Attachments:
Answered by
0
The Java program for the product of the three number is stated below:
Explanation:
import java.util.Scanner; // include the file
public class Product// class declared
{
public static void main(String[] args) // definition of main function
{
Scanner input = new Scanner(System.in); // object declaration of Scanner class.
int number1 = input.nextInt(); // take first input
int number2 = input.nextInt(); // take second input
int number3 = input.nextInt(); // take third input
System.out.println(number1*number2*number3);
}
}
Output:
- If the user inputs are 3,4,1 then the output is 12.
- If the user inputs are 2,2,2 then the output is 8.
Code explanation:
- Firstly there is a class and the main function definition.
- then the programs take three inputs and store it on number1, number2, and number3.
- Then It prints the value which is the product of the number1, number2, and number3 by the print statement.
Learn More:
- Java program: https://brainly.in/question/1214736
- Input stream in java : https://brainly.in/question/13252586
Similar questions
Geography,
6 months ago
English,
6 months ago
Math,
11 months ago
English,
11 months ago
Social Sciences,
1 year ago