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
Pachacha [2.7K]
3 years ago
11

Write a program that asks the user to input

Computers and Technology
1 answer:
Savatey [412]3 years ago
5 0

Answer:

import java.util.Scanner;

public class ANot {

   public static void main(String[] args) {

Scanner input = new Scanner(System.in);

       System.out.println("Please Enter the number of fuel gallons in the car's tank: ");

       int numGallons = input.nextInt();

       System.out.print("What is the fuel efficiency of your car in miles/gallon ");

       double fuelEffi = input.nextDouble();

       System.out.print("How much is the price per gallon: ");

       double price = input.nextDouble();

       double milesCanGo = fuelEffi*numGallons;

       double numOfGallons100Miles = 100/fuelEffi;

       System.out.println("The cost per 100 miles is "+numOfGallons100Miles*price);

       System.out.println("Your car can go as far as "+milesCanGo+" miles with the current fuel " +

               "in your tank");

   }

}

Explanation:

Using Java programming language;

  1. Import the Scanner class to receive user input
  2. Prompt user to input numofGallons, fuelEfficiency and pricePerGallon
  3. Calculate the miles the car can go with the formula milesCanGo = numofGallons X fuelEfficiency
  4. Calculate the number of gallons for 100 miles distance (100/fuelEfficiency)
  5. The cost of driving 100 miles is (100/fuelEfficiency)*pricePerGallon
  6. Output cost for 100 miles and how far the car can go.
You might be interested in
Computer models are the only type of model that can be used to make predictions. Please select the best answer from the choices
katrin2010 [14]
<span>Computer models are the only type of model that can be used to make predictions.
This is a false statement.

</span>
8 0
3 years ago
Read 2 more answers
Angela wants to give her press release an attractive and cohesive appearance. How can she quickly format her press release so it
I am Lyosha [343]

Answer:

Press release tools on websites

Explanation:

There are several tools on websites that provide quick press release. It is possible to directly select the style from several choices. Each style has own fonts and colors however, it is possible to change them.  

Step by step;

Angela may enter the website that provides press release

Then can select a theme with fonts and colors

Then she can put her work

It is ready to publish

8 0
4 years ago
A _____ is a machine that changes information from one form into another.
gavmur [86]
The answer would be computer
5 0
3 years ago
Which success factor or reward of IS implementation enables you to see the real-time status or availability of a process or prod
trasher [3.6K]

Answer:

efficiency ( A )

Explanation:

Information systems ( IS ) implementation in business helps to create a competitive advantage for the business in the market where its products or services are sold .

A good/successful information system will be bring to light the real time status of a product by showcasing the products efficiency in real time to the potential/ returning customers who needs the product. showcasing the efficiency of a product over another similar products is a very good way to gain a very good advantage over other similar products.

The quality and productivity of the product cannot be affected  via the information systems. while the visibility of the product is done by the marketing department. the information systems give a real time detail of a product mentioning its composition and efficiency in real time.

7 0
4 years ago
Luentifying message rullidl Upuuns
WITCHER [35]

Answer:

Plain text, Rich Text, and HTML format

Explanation:

In Outlook 2016, three formats are allowed. You can send the plain text only or you can send using the Rich text format. However, there is another sending format as well that is allowed, and it is the HTML format. And by default, if you will let the Outlook choose the most appropriate sending format then the email message will be sent using the HTML format.

7 0
3 years ago
Other questions:
  • Which statement about information published on the internet is true?
    9·2 answers
  • What does a server do? *
    11·1 answer
  • As a rising photographer who has recently been recognized for several impactful images, why might you explore copyright protecti
    13·1 answer
  • Developers and organizations all around the world leverage ______ extensively.
    9·2 answers
  • Differences between barcode reader and character recognition devices​
    9·2 answers
  • What are the biggest problems facing the criminal justice system in the area of computer crime
    10·2 answers
  • In open addressing with linear probing we must consider how to encode
    13·1 answer
  • Tulio is editing his video. He used the Trim Video tab. Tulio most likely changed the
    12·1 answer
  • What is the first law of thermodynamics?
    5·2 answers
  • The sum of these 9 numbers is 36. 2, 2, 6, 2, 1, 8, 7, 5, 3 What is the mean of these 9 numbers?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!