Write a public static method named DiffMinMax3 that will take three arguments of type int and will
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a public static method named DiffMinMax3 that will take three arguments of type int and will return a int. When called, and passed three int values, this method must compute and return the positive difference between the minimum and maximum of the three argument values.
Here are some examples of what the method should return for various sets of argument values:
DiffMinMax3(1, 2, 3) should return 2 DiffMinMax3(50, 10, 20) should return 40 DiffMinMax3(1, 1, 1) should return 0 DiffMinMax3(50, 100, 10) should return 90
You will need to write code to determine the minimum and the maximum argument values passed to the method
Do not use Math.min or Math.max methods
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date: