Skip to content

sufia1117/Khan-Project0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Khan-Project0

Problem 2.23: (Cost of Driving) Write a program that prompts the user to enter the distance to drive, the fuel efficiency of the car in miles per gallon, and the price per gallon then displays the cost of the trip.

Build Procedure: Step 1: Import Scanner class from Java.util Step 2: Use Scanner to prompt and collect user input for driving distance Step 3: Use Scanner to prompt and collect user input for miles per gallon Step 4: Use Scanner to prompt and collect user input for price per gallon Step 5: Divide driving distance input by miles per gallon input to find gallons used Step 6: Multiply price per gallon by gallons used to find total cost of driving Step 7: Print final string stating the cost of driving

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages