Question: Write a single statement that prints outsideTemperature with 2 decimals. End with newline. Sample output with input 103.46432: 103.46 import java.util.Scanner; public class OutsideTemperatureFormatting {
Write a single statement that prints outsideTemperature with 2 decimals. End with newline. Sample output with input 103.46432:
103.46
import java.util.Scanner;
public class OutsideTemperatureFormatting { public static void main (String [] args) { Scanner scnr = new Scanner(System.in); double outsideTemperature;
outsideTemperature = scnr.nextDouble();
/* Your solution goes here */ 103.46
} }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
