Question: Java 1. Receive two user inputs for integer type variables maxNum and numOfSpaces and write a method named printColumns that accepts two parameters: a maximum
1. Receive two user inputs for integer type variables maxNum and numOfSpaces and write a method named printColumns that accepts two parameters: a maximum number and a number of spaces. The method should print that many numbers starting at 1, with each number separated by the given number of spaces. For example, the call printColumns(maxNum, numOfSpaces) where maxNum is 8 and numOfSpaces is 5, should produce the following output:
1 2 3 4 5 6 7 8
2. Receive three your inputs for integer type variable a, b, and c. and write a method named average3 that accepts three parameters and returns the average of the three values. For example, the call average3(a, b, c), where a=15, b=22, and c=-1 should return 12.0.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
