Question: Java Trace the execution of the following program assuming the input stream contains the numbers 10, 3, and 14.3. On your answer sheet use the

Trace the execution of the following program assuming the input stream contains the numbers 10, 3, and 14.3. On your answer sheet use the below table that shows the value of each variable at each step. Also show the output (exactly as it would be printed). Create a Java program in NetBeans to test your output. 1/ FILE: Trace.java 1/ PURPOSE: An exercise in tracing a program and understanding 17 assignment statements and expressions. import java.util.Scanner; public class Trace public static void main (String[] args) int one, two, three; double what; Scanner scan = new Scanner(System.in); System.out.print ("Enter two integers: "); one - scan.nextInt(); two = scan.nextInt(); //STEP 1 System.out.print("Enter a floating point number: "); what = scan.nextDouble(); //STEP 2 three = 4 * one +5 two; two = 2* one; //STEP 3 System.out.println ("one" + two + ":" + three); one = 46 / 5.2 + 19 % 4; three = one + two; what = (what + 2.5) 72; //STEP 4 System.out.println (what + " is what!"); Dit Predictions STEP two three what Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
