Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (2 points) What does the following code print? double temp -23.0; if (temp - 80) System.out.println(cool' System.out.println( warm); System.out.println(hot); 2. (3 points) Give a
1. (2 points) What does the following code print? double temp -23.0; if (temp - 80) System.out.println("cool' System.out.println( "warm"); System.out.println("hot"); 2. (3 points) Give a conditional test (to be placed at the underscored location) for the follow ing if statement that will cause it to print Bang if b is positive integer that is a multiple of 7 and less then 100, otherwise it prints Gong int b Integer.parseInt (args[O]); System.out.println("Bang"); System.out.println("Gong") if else 3. (5 points) Give a sequence of if statements that prints out the median value of three distinct integers that are stored in integer variables a, b, and c 4. (2 points) What does the following while loop print? int i-1; while (i 50 ) break; kt 10; System.out.printlnO 6. (2 points) What does the following while loop print? int k = 1; while (k 50&&k
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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