Skip to content

llcain/learn-Java-Oil-Change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

learn-Java-Oil-Change

import java.util.Scanner; public class App {

public static void main(String args[]) {

//intialize variables

    float odometerNumber;
    float totalMiles = 10000;
    float milesDay = 80;
    float result;

    Scanner Keyboard = new Scanner(System.in);

    //enter current odometer number

    System.out.println("Enter current odometer number");
    odometerNumber = Keyboard.nextFloat();


    //calculate the result of total miles driven

    result = odometerNumber + totalMiles;

    //Display calculation to screen

    System.out.println("Your next oil change is at " + result);



        }
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published