Question: Doubles boxHeight and boxWeight are read from input. Output the following: boxHeight left - aligned, a minimum of 6 characters, and 2 digits following the
Doubles boxHeight and boxWeight are read from input. Output the following:
boxHeight leftaligned, a minimum of characters, and digits following the decimal point.
boxWeight with a sign, Os as padding, a minimum of characters, and digits following the decimal point.
End each output with a newline.
Ex: If the input is then the output is:
import java.util. Scanner;
public class OutputFormatter
public static void mainString args
Scanner scnr new Scanner
System.in;
double boxHeight;
double boxWeight;
boxHeight scnr nextDouble;
boxWeight scnr nextDouble;
Y Your code goes here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
