Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
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
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 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
Java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started