Exemplo n.º 1
0
 public void nhap()
 {
     Console.WriteLine(" nhap n: ");
     n  = Convert.ToInt32(Console.ReadLine());
     DS = new QLSinhVien[n];
     for (int i = 0; i < n; i++)
     {
         DS[i] = new QLSinhVien();
         DS[i].nhap();
     }
 }
Exemplo n.º 2
0
 public void sapxep()
 {
     for (int i = 0; i < n; i++)
     {
         for (int j = i + 1; j < n; j++)
         {
             if (string.Compare(DS[i].Masv, DS[j].Masv, true) >= 0)
             {
                 QLSinhVien tg = new QLSinhVien();
                 tg    = DS[i];
                 DS[i] = DS[j];
                 DS[j] = tg;
             }
         }
     }
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            QLSinhVien sv1 = new QLSinhVien();

            sv1.nhap();
            sv1.inTT();
            DanhSach ds1 = new DanhSach();

            ds1.nhap();
            ds1.inthongtin();
            Console.WriteLine(" sap xep la\n");
            ds1.sapxep();
            ds1.inthongtin();
            Console.WriteLine(" diem >8  la\n");
            ds1.danhsach1();
            Console.ReadLine();
        }