public static void Main()
string listOfDestinations=" ";
double milesPerGallon = 1;
int addAnotherDestination = 1;
Console.WriteLine("Welcome, we are going to calculate how many gallons of gas you need for your next trip.");
Console.WriteLine("What is your MPG for your car?");
milesPerGallon = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("What is the starting point named?");
listOfDestinations = Console.ReadLine();
while (addAnotherDestination == 1)
Console.WriteLine("What is the next destination?");
listOfDestinations = listOfDestinations + ", and " + Console.ReadLine();
Console.WriteLine("What is the distance between the two points?");
totalMiles = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Would you like to add another destination? Type N for No and Y for Yes.");
userResponse = Console.ReadLine();
addAnotherDestination = 0;
Console.WriteLine("We calculated how much gas you need to get from " + listOfDestinations);
Console.WriteLine("you need " + gallons = (totalMiles + totalMiles)/milesPerGallon);