I never did Console programming so got stuck in this silly thing:
Console.Write("Enter customer's salary: ");
string sal = Console.Write("{0}! ", Console.ReadLine().ToString());
It generates error: Cannot implicitly convert type ‘void’ to ‘string’
Console.Writeis a void method, it does not return what it writes to the console.What you actually need is
string.Format:Also, the extra
ToString()at the end is redundant (as noted in the comments) for two reasons:Console.ReadLinealready returns a string