Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Program 5

Program Description:

  • Using the following data, calculate and print out the average miles per gallon for each vehicle.
  • Round the output to the nearest 10th gallon.
  • Be sure to use variables with easily recognizable names.

Program Data ##:

Vehicle Miles Gallons
Royale 286 9
Koopa King 412 40
Pipe Frame 361 18
Badwagon 161 11

Statements Required:

  • System.out
  • Variable Assignment
  • Math Operators

Sample Output:

Mushroom Cup Prix Racer Average Miles/Per Gallon:

Royale averaged 31.8 m/g

Koopa King averaged 10.3 m/g

Pipe Frame averaged 20.1 m/g

Badwagon averaged 14.6 m/g

About

fhs-csa-2024-p1-program5-FHS-CSA-Program5 created by GitHub Classroom

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages