Console.WriteLine("Total Pay:{0:C}", pay)

Why {0:C} for?

Currency. {0:C} says that the first argument after the format string is to be formatted with the standard currency formatter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.