Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Tài liệu đang bị lỗi
File tài liệu này hiện đang bị hỏng, chúng tôi đang cố gắng khắc phục.
Danh sách kết nối kép
Nội dung xem thử
Mô tả chi tiết
// Dia chi email cua 2 lop '[email protected]';
// Day la bai tap ban Quy lop Tk62 hoi toi, toi da sua theo y cua
ban //ay, cac em xem tham khao nhe.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace danh_saach_noi_kep
{
class dnode
{
public string tenchinhanh;
public string diachi;
public int sodienthoai;
public dnode pre;
public dnode next;
}
class list
{
public dnode head, tail;
}
class Program
{
static dnode Ggetnode(string x, string y, int z)
{
dnode p = new dnode();
if (p == null)
{
throw new Exception("khong du bo nho");
}
else
{
p.tenchinhanh = x; p.diachi = y; p.sodienthoai = z;
p.pre = null; p.next = null; return p;
}
}
static void chendau(ref list l, string x, string y, int z)
{
dnode p = Ggetnode(x, y, z);
if (l.head == null)
{
l.head = l.tail = p;
}
else
{
p.next = l.head;
l.head.pre = p;
l.head = p;
}
}
static void chencuoi(ref list l, string x, string y, int z)
{
dnode p = Ggetnode(x, y, z);
{
if (l.head == null)