Ask Question

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. 9 August, 07:42
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers