Question: I want to get an answer or code for this. 3. Trace the evaluation of the following expressions, and give their resulting values: A. 2


3. Trace the evaluation of the following expressions, and give their resulting values: A. 2 + 3 * 4 - 6 B. 14 / 7 * 2 + 30 / 5+ 1 C. (12 + 3)/ 4 * 2 D. (238 % 10 + 3) % 7 E. (18 - 7) * (43 % 10) F. 2 + 19 % 5 - (11 * (5 / 2)) Here's an example of how to trace the evaluation of (A): 2 + 3 * 4 - 6 // * goes first 2 + 12 6 // +, - go next: left-to-right 14 6 // - goes last 8 7. Imagine you are writing a personal fitness program that stores the user's age, gender, height (in feet or meters), and weight (to the nearest pound or kilogram). Declare variables with the appropriate names and types to hold this information. 18. Suppose you have a real number variable x. Write a Java expression that computes the following value y while using the operator only four times: y = 12.3x4- 9.1x3 + 19.3x2 - 4.6x + 34.2 From section 2.3: 21. Complete the following code, replacing the "FINISH ME" parts with your own code: public class Countz { public static void main(String[] args) { for (int i = /* FINISH ME */) { System.out.println(/* FINISH ME )): } } } to produce the following output 2 times 1 - 2 2 times 2 - 4 2 times 3 - 6 2 times 4 = 8 25. What is the output of the following loop? int total = 25; for (int number = 1; number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
