1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sidana [21]
2 years ago
8

Write a java program that prompts the user to input a length expressed in centimeters. The program should then convert the lengt

h to inches (to the nearest inch) and output the length expressed in yards, feet, and inches, in that order (all three formats). For example, suppose the input for centimeters is 312. To the nearest inch, 312 centimeters is equal to 123 inches. So 123 inches would then be output as 3 yards, 1 foot, and 3 inches It should not output as: 2 yards, 4 feet and 3 inches = 10 feet, 3 inches = 10.25 feet.
English
1 answer:
lilavasa [31]2 years ago
7 0

The program is an illustration of a sequential program

<h3>What are sequential programs?</h3>

Sequential programs are programs that do not require loop or iteration

<h3>The main program</h3>

The program written in Java, where comments are used to explain each line is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 //This creates a Scanner object

 Scanner input = new Scanner(System.in);

 //This prompts the user for length in cm

 System.out.print("Length (cm): ");

 //This gets the input for length

 int lengthCM = input.nextInt();

 //This converts the length to inches

 int lengthInches = (int)(Math.round(lengthCM/2.54));

 //This converts the length to yards

 int lengthYard = lengthInches/36;

 //This converts the remaining length to feet

 int lengthFeet = (lengthInches -36 * lengthYard)/12;

 //This calculates the remaining inches

 lengthInches = lengthInches - lengthYard * 36 - lengthFeet * 12;

 //This prints the required output

 System.out.print(lengthYard+" yards, "+lengthFeet+" feet and "+lengthInches+" inches");

}

}

Read more about sequential programs at:

brainly.com/question/17970226

You might be interested in
Which technique do poets use to create the mood? meter conflict unusual subjects summary
worty [1.4K]
The answer should be Meter.
7 0
4 years ago
Read 2 more answers
Explain the allusion Granger makes about the Phoenix.
babymother [125]

c)  

Like the Phoenix, which rises from the ashes, they will rebuild their society from the destruction caused by the bombing and the damage caused by outlawing books.

3 0
3 years ago
Read 2 more answers
PLZ HELP ME IM DESPARATE! 100 POINTS AND BRAINLIEST! Choose one of these themes and analyze the development of the theme. • “Pre
Sphinxa [80]

Explanation:

You can use different sentence openers, like 'preposition', 'ly', 'ing', 'wwwasiab', 'Very short sentence', 'ed', 'Abstract noun opener'. I think these are good sentence openers, they make your paragraph go more interesting.

As for the hook, you should not reveal the title you are suppose to be writing about. For ex. I am supposed to be writing tsunamis. I don't write 'tsunami' as the topic. I'll write 'Destructive waves'. That'll usually hook the reader.

The primary source, you should go online and search your 'www/ (your topic)! That would give you a bunch of information. Then you can open one of the websites and chose a good part then put quotations around it then put it in your passage.

Another one is you should use five sense words (taste, smell, sound, sight, touch), you can search online for them.

The last one, (I don't recommend this, cause it's like cheating) search 'EssayTyper' on g oogle, and type the topic in it, and it usually writes you a nice pretty passage. (P.S If you use this, you should probably change the sentences and stuff, then it doesn't really count as cheating)

SORRY, But I am in class, so I don't have time to write a passage, I am not that good either! I just hoped I helped you!

7 0
3 years ago
In Langston Hughes's poem "Justice," what is Justice a symbol of?
Hoochie [10]

Answer:

C. the justice system skewed against African Americans.

Explanation:

Here's the poem:

That Justice is a blind goddess

Is a thing to which <u>we black are wise</u>:

Her bandage hides two festering sores

That once perhaps were eyes.

Notice how Hughes writes that "we black are wise." This implies that the justice he speaks of (which is referred to as a "her" throuhgout the poem) is "blind" when it comes to the struggles of African Americans.

Choice A is incorrect because the poem clearly implies that the justice system is biased against blacks.

Choice B is incorrect because the poem calls justice "blind," which implies that she is flawed.

Choice D is incorrect because there is no mention of "human rights" or not caring." Justice is described as being "blind" which does not imply either.

7 0
3 years ago
Read 2 more answers
Which shows a change in trade from early villages to complex societies?
Lerok [7]

Answer:

Wassup!!! XD

Explanation:

As a result of the first agricultural revolution, humans were able to produce their own food as well as surpluses which meant that they no longer had to be nomadic people who followed food sources.

Due to the presence of the aforementioned surpluses, the society changed in that not everyone was required to work to produce food. Some of these people then became skilled workers known as artisans who could make goods and services that they could then sell to other villages.

This meant that trade did not just occur in villages but across them and led to a development in trade that brought prosperity to those involved thereby transforming small villages and towns to more complex societies.

Happy to Help From, Adam :P <3

7 0
3 years ago
Other questions:
  • Which evidence from Chaucer's "The Monk's Tale" best supports this theme?
    9·1 answer
  • Which medium can affect the message of a news story by providing it with
    7·2 answers
  • Select all the correct answers.
    11·1 answer
  • Pros and Cons about Genetically modified foods
    7·1 answer
  • Before he conduct any research, Marcus spends 10 minutes writing all the ideas about the history of video games that come to min
    7·2 answers
  • Select the correct answer.
    12·1 answer
  • Jack Riley is my true love's name;
    7·1 answer
  • Help me with this, I’ll give brainliest
    11·1 answer
  • Think of a time when someone in your life created a safe positive environment what did it look it feel like
    10·2 answers
  • Plagiarism can be defined as:
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!