read user input of double type
Try this:
double Salary = Convert.ToDouble(Console.ReadLine());
You'll have to check the entire thing on it's way in.. as Console.Read()
returns an integer.
double totalSalary;
if (!double.TryParse(Console.ReadLine(), out totalSalary)) {
// .. error with input
}
// .. totalSalary is okay here.
Simplest answer to your question:
double d = Double.Parse(Console.Readline());