Character myLetter, integer amountCalculated, and double length are read from input. Output the following: • myLetter as a hexadecimal integer value, followed by "%". • amount Calculated as an octal integer value, followed by "%". length as a floating-point value in scientific notation, followed by "%". ● End each output with a newline. Ex: If the input is V 93 18.5, then the output is: 56 %/10 135 %/ 1.850000e+01% 1 import java.util.Scanner; 2 3 public class Output Formatting { 4 public static void main(String[] args) { 5 Scanner scnr = new Scanner(System.in); 6 7 8 9 10 11 12 13 char myLetter; int amount Calculated; double length; my Letter = scnr.next().charAt(0); amount Calculated=scnr.nextInt (); length = scnr.nextDouble();

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 5E: a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered...
icon
Related questions
icon
Concept explainers
Question
1 44°F
Character myLetter, integer amount Calculated, and double length are read from input. Output the following:
• myLetter as a hexadecimal integer value, followed by "%".
• amount Calculated as an octal integer value, followed by "%".
length as a floating-point value in scientific notation, followed by "%".
●
End each output with a newline.
Ex: If the input is V 93 18.5, then the output is:
56 %/10
135 %/100
1.850000e+01%
1 import java. util.Scanner;
2
23456789
3 public class Output Formatting {
8
10
11
12
13
public static void main(String[] args) {
Scanner scnr = new Scanner (System.in);
char myLetter;
int amount Calculated;
double length;
my Letter = scnr.next().charAt(0);
amount Calculated=scnr. nextInt();
length = scnr.nextDouble();
Transcribed Image Text:1 44°F Character myLetter, integer amount Calculated, and double length are read from input. Output the following: • myLetter as a hexadecimal integer value, followed by "%". • amount Calculated as an octal integer value, followed by "%". length as a floating-point value in scientific notation, followed by "%". ● End each output with a newline. Ex: If the input is V 93 18.5, then the output is: 56 %/10 135 %/100 1.850000e+01% 1 import java. util.Scanner; 2 23456789 3 public class Output Formatting { 8 10 11 12 13 public static void main(String[] args) { Scanner scnr = new Scanner (System.in); char myLetter; int amount Calculated; double length; my Letter = scnr.next().charAt(0); amount Calculated=scnr. nextInt(); length = scnr.nextDouble();
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning