In a while loop, how do you add a variable from the past loop to the same variable in the current loop

So i am really new to Java, only started programming a couple of months ago for a class. I am completely and utterly stuck on this project. This is the project.

And this is my code so far.

    double mile;
double gas;
int week;
double mpg;
double totalmile; 
double totalgas;




week = 0;
gas = 0;
mile = 0;
totalmile = 0;
totalgas = 0;

Scanner reply = new Scanner(System.in);

System.out.println("Please enter the amount of miles.");
mile = reply.nextDouble();



while(mile != -99)
{
    week++;



    System.out.println("Please enter the amount of gas (in gallons) purchased for this week.");
    gas = reply.nextDouble();
    mpg = mile / gas;



    System.out.println("Week: "+week+"");
    System.out.println("Miles: "+mile+" Vacation Miles Traveled: "+totalmile+"");
    System.out.println("Gallons: "+gas+" Vacation Gallons Purchased: "+totalgas+"");        
    System.out.println("MPG: "+mpg+"");

    System.out.println("Please enter the amount of miles.");
    mile = reply.nextDouble();


}

The only part i am REALLY stuck on is how to get the “Vacation Miles/Gas” values, i dont know how to add up a total of the same variable while in a while loop.