0% found this document useful (0 votes)
10 views2 pages

C# Programs for Calculations and UI

The document contains four programs that perform various calculations and UI updates. Program 1 calculates the total and average of three numbers, Program 2 computes the cost and tax based on price and quantity, Program 3 calculates salary components and net pay, and Program 4 populates a second combo box based on the selection of the first combo box. Each program updates relevant UI elements with the computed values.

Uploaded by

Abdullahi Idris
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

C# Programs for Calculations and UI

The document contains four programs that perform various calculations and UI updates. Program 1 calculates the total and average of three numbers, Program 2 computes the cost and tax based on price and quantity, Program 3 calculates salary components and net pay, and Program 4 populates a second combo box based on the selection of the first combo box. Each program updates relevant UI elements with the computed values.

Uploaded by

Abdullahi Idris
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program 1:

{
int fnum = Convert.ToInt32([Link]);
int snum = Convert.ToInt32([Link]);
int tnum = Convert.ToInt32([Link]);
decimal total = fnum + snum + tnum;
[Link] = [Link]();
decimal average = total / 3;
[Link] = [Link]();

Program 2:
{
int price = [Link]([Link]);
decimal quantity = [Link];
decimal cost = price * quantity;
[Link] = [Link]();
decimal tax = price / 100;
[Link] = [Link]();
decimal actualcost = cost + tax ;
[Link] = [Link]();

Program 3:
{
Decimal salary = [Link]([Link]);
Decimal DA = salary / 100 * 30 ;
[Link] = [Link]();
Decimal HRA = salary / 100 * 12;
[Link] = [Link]();
Decimal PF = salary / 100 * 10;
[Link] = [Link]();
Decimal gross = salary + DA + HRA ;
[Link] = [Link]();
Decimal netpay = gross - PF ;
[Link] = [Link]();

}
{
[Link]();
}
{
[Link] = " ";
[Link] = " ";
[Link] = " ";
[Link] = " ";
[Link] = " ";
[Link] = " ";

Program 4:
{
[Link]();
if ([Link] == "FAMS")
{
[Link]("Accounting");
[Link]("Economics");
[Link]("Arabic");
[Link]("Hausa");
}
else
{
[Link]("computer science");
[Link]("cyber security");
[Link]("information technology");
[Link]("information system");
[Link]("software engineering");

}
}

You might also like