Ask Question
3 November, 20:25

Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product

+4
Answers (1)
  1. 4 November, 00:14
    0
    The program accepts a whole number as input, multiplies that number by 12, and then outputs the product

    Explanation:

    This program asks user to enter two integer numbers and displays the product.

    The scanner class is used as input functions.

    The code is shown below:

    import java. util. Scanner;

    public class Demo {

    public static void main (String[] args) {

    Scanner scan = new Scanner (System. in);

    System. out. print ("Enter number: ");

    int num1 = scan. nextInt ();

    scan. close ();

    int product = num1*12;

    System. out. println ("Output: "+product);

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers