using System.Collections.Generic;
using System.Threading.Tasks;
public MyEmployee(string f, string l, string eID, int d = 2, double h = 0)
Console.Write("Enter First name:");
fname = Console.ReadLine();
Console.Write("Enter Last name:");
lname = Console.ReadLine();
Console.Write("Enter Employee ID:");
EmpID = Console.ReadLine();
Console.Write("Enter Degree(0-5):");
Degree = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter hours:");
hours = Convert.ToDouble(Console.ReadLine());
TotalSalary = 900000 + hours * 2500;
TotalSalary = 1100000 + hours * 3000;
TotalSalary = 1400000 + hours * 4500;
TotalSalary = 1800000 + hours * 6500;
TotalSalary = 2200000 + hours * 10000;
TotalSalary = 3000000 + hours * 15000;
Console.WriteLine("{0} {1} {2} ====> {3}", fname, lname, EmpID, TotalSalary);
public static MyEmployee FindMaxTS(MyEmployee[] x, int n)
MyEmployee temp = new MyEmployee();
for (int i = 1; i < n; i++)
if (x[i].TotalSalary > temp.TotalSalary)
public static void Sortlist(MyEmployee[] y, int n)
MyEmployee temp = new MyEmployee();
for (int i = 0; i < n; i++)
for (int j = 0; j < n - i - 1; j++)
if (y[j].TotalSalary < y[j + 1].TotalSalary)
public static void bishtar30saat(MyEmployee[] y)
for (int i = 0; i < y.Length; i++)
Console.Write("karmand " + y[i].fname + " bishtar 30 saat darad");
static void Main(string[] args)
MyEmployee[] emp = new MyEmployee[10];
int count = int.Parse(Console.ReadLine());
for (int i = 0; i < count; i++)
emp[i] = new MyEmployee();
for (int i = 0; i < 10; i++)
MyEmployee MaxEMP = new MyEmployee();
MaxEMP = MyEmployee.FindMaxTS(emp, 10);
Console.Write("\n\n Maximum Average for:");
Console.WriteLine("\n\n Sorted List:");
MyEmployee.Sortlist(emp, 10);
for (int i = 0; i < 10; i++)