Ask Question
23 July, 15:00

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

+1
Answers (1)
  1. 23 July, 16:01
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers