Visual C# Studio
Using Visual Studio Create a simple application Manny Management Consulting charges P3,000 for training fee
and P250 per person for registration fee. Create an application
to help the accountant make a billing statement showing the
customer's name, address, number of participants, training fee,
registration fee and total amount due.
using System;
using System.Collections.Generic;
namespace App
{
class Program
{
static void Main(string[] args)
{
string[] names = new string[100];
string[] addresses = new string[100];
double[] trainingFee = new double[100];
double[] registrationFee = new double[100];
double[] amountDues = new double[100];
double totalAmountDue = 0;
Console.Write("Enter the number of participants: ");
int numberParticipants = int.Parse(Console.ReadLine());
for (int i = 0; i < numberParticipants; i++)
{
Console.Write("Enter customer's name: ");
names[i] = Console.ReadLine();
Console.Write("Enter customer's address: ");
addresses[i] = Console.ReadLine();
trainingFee[i] = 3000;
registrationFee[i] = 250;
amountDues[i] = trainingFee[i] + registrationFee[i];
Console.WriteLine();
}
Console.WriteLine();
for (int i = 0; i < numberParticipants; i++)
{
Console.WriteLine("Customer's name: " + names[i]);
Console.WriteLine("Customer's address: " + addresses[i]);
Console.WriteLine("Customer's training fee: P" + trainingFee[i].ToString());
Console.WriteLine("Customer's registration fee: P" + registrationFee[i].ToString());
Console.WriteLine("Customer's total amount due: P" + amountDues[i].ToString());
totalAmountDue += amountDues[i];
Console.WriteLine();
}
Console.WriteLine("The total amount due: P" + totalAmountDue.ToString());
Console.ReadLine();
}
}
}
Comments
Leave a comment