Using C# and Visual Studio, design and implement a standalone command-line application that fulfils the following requirements: 1. The user shall be able to enter the following values: a. Gross monthly income (before deductions). b. Estimated monthly tax deducted. c. Estimated monthly expenditures in each of the following categories: i. Groceries ii. Water and lights 21; 22; 23 2022 © The Independent Institute of Education (Pty) Ltd 2022 Page 5 of 17 iii. Travel costs (including petrol) iv. Cell phone and telephone v. Other expenses
Here is program:
static void Main(string[] args)
{
int grossmoninc;
int estimmontaxdeduct = 0;
int waterandlights = 0;
int travelcost = 0;
int phoneandtele = 0;
int other;
Console.WriteLine("Enter Gross monthly income (before deductions): ");
grossmoninc = Int32.Parse(Console.ReadLine());
Console.WriteLine("Enter Estimated monthly tax deducted: ");
estimmontaxdeduct = Int32.Parse(Console.ReadLine());
Console.WriteLine("Enter estimated monthly expenditures in each of the following categories: ");
Console.WriteLine("Water and lights: ");
waterandlights = Int32.Parse(Console.ReadLine());
Console.WriteLine("Travel costs (including petrol): ");
travelcost = Int32.Parse(Console.ReadLine());
Console.WriteLine("Cell phone and telephone: ");
phoneandtele = Int32.Parse(Console.ReadLine());
Console.WriteLine("Other expenses: ");
other = Int32.Parse(Console.ReadLine());
}
Comments
Leave a comment