Ask Question
5 January, 18:45

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.)

+3
Answers (1)
  1. 5 January, 19:18
    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?
Get 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 & 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