This is my program:
using System;
using static System.Console;
class MoveEstimator
{
static void Main(string[] args)
{
const double BASE_RATE = 250.00;
const double HOUR_RATE = 150.00;
const double COST_MILE = 2.00;
string amtHoursAsString;
double amtHours;
string numMilesAsString;
double numMiles;
double totalOfMove;
Write("Enter amount of hours >> ");
amtHoursAsString = ReadLine();
amtHours = Convert.ToDouble(amtHoursAsString);
Write("Enter number of miles >> ");
numMilesAsString = ReadLine();
numMiles = Convert.ToDouble(numMilesAsString);
totalOfMove = (amtHours * HOUR_RATE) + (numMiles * COST_MILE) + BASE_RATE;
WriteLine( "Your estimated move cost is " + totalOfMove);
return;
}
}
It works for the input, but the program closes before it gives me the output. I'm new at this as you can tell. I'm learning it with a book so I just want an entry level answer so that I can work my way up. I just need to know what is wrong with my WriteLine statement. Thank you so much in advance!