Ask Question
6 December, 17:20

6.6 Write a function named timesTen. The function should have an integer parameter named number. When timesTen is called, it should display the product of number times 10. (Note: just write the function. Do not write a complete program.)

+1
Answers (1)
  1. 6 December, 21:14
    0
    public static void timesTen (int num) {

    int numTimesTen = num*10;

    System. out. println ("The number "+num + " times 10 is "+numTimesTen);

    }

    Explanation:

    In the code snippet above which is written in Java programming language, A method (function) is created. The return type is void since this method according to the question will only give an output and not necessarily return a value.

    The methods only int parameter is multiplied by 10

    Using string concatenation the following output is given

    The number 5 times 10 is 50: For an argument of value 5
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “6.6 Write a function named timesTen. The function should have an integer parameter named number. When timesTen is called, it should display ...” 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