Double Linked List
PROGRAM DOUBLE LINKED LIST #include <iostream> using namespace std; struct data { string jenis; string jumlah; string umur; string harga; data *next; data *prev; }; data *baru,*hapus,*after; data *head=NULL,*tail=NULL; void tambah() { baru=new data; cout<<" jenis : ";cin>>baru->jenis; cout<<" umur : ";cin>>baru->umur; cout<<" jumlah : ";cin>>baru->jumlah; cout<<" harga : ";cin>>baru->harga; baru->next = NULL; baru->prev = NULL; if(head==NULL) { tail=baru; } else { baru->next=head; head->prev=baru; } head=baru; } void tambah_belakang() { baru=new data; cout<<" jenis : ";cin>>baru->jenis; cout<<" umur : ";cin>>