Question: Write a simple Java program EvaluateFunction.java that reads three integer variables x, y, and z from the user and evaluates the outputs of f(x,
Write a simple Java program EvaluateFunction.java that reads three integer variables x, y, and z from the user and evaluates the outputs of f(x, y) and g(x, y, z) for given values. The definitions of functions f(x, y) and g(x, y, z) are as follows: Sample Output: Enter integer x: 2 Enter integer y: 3 Enter integer z: 4 f(2,3)= 18 g(2,3,4) = -21 x-y x + y f(x,y) == g(x, y, z) = + 3xy x - y x + z x+Z y-z Note 1: Compute the result as a double value. Print the result as an integer. Use Math.round function to find the integer value nearest to the computed double value.
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
