Java TOPIC 30 – VOID FUNCTIONS LESSON WORK QUESTION
1 Inside the main function,
the user should be asked to provide the low and high values. You should then use the function to do the
rest of the work. QUESTION
2 Write the function named outputStars
that will output the number of stars that is provided as parameter. Test your function from
main. Get the value of the parameter
from the user before making the function call. QUESTION
3 Write a function named outputMultiples
that will get a String s and an int n as arguments. It then outputs s on the screen n times over. Therefore, the following
function call outputMultiples("yo", 5); will output the following
to screen: yoyoyoyoyo |
|