Question #39284

Write a program that will calculate and output the following:
a) Gross Wage
b) Deductions (15% of gross)
c) Nett Wage
Note: The concept of wages.... inputs

Expert's answer

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nett_Wage
{
    class Program
    {
        static void Main(string[] args)
        {
            double wage = 0;
            do
            {
                Console.Clear();
                Console.WriteLine("Please enter Gross Wage:");
                if (!Double.TryParse(Console.ReadLine().Replace('.', ','), out wage) ||
                    wage < 0)
                {
                    Console.WriteLine("Wrong input!");
                }
                else
                {
                    Console.WriteLine("Deductions 15%:{0,10:###,###.##} \nNett
                    Wage:{1,15:###,###.##} ", wage * 0.15, wage * 0.85);
                }
                Console.WriteLine("\nDo you want to continue? Esc - EXIT , esle - CONTINUE");
                if (Console.ReadKey().Key == ConsoleKey.Escape) Environment.Exit(0);
            } while (true);
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS