#include<iostream.h>
struct LinkedList {
int data;
struct LinkedList *badi;
};
void main ()
{
struct LinkedList *sar, *temp, *jadid, *dovvom;
// slide 1, dorost kardane liste se taayi
temp = new struct LinkedList;
temp->data = 14;
sar = temp;
temp = new struct LinkedList;
temp->data=23;
sar -> badi = temp;
temp->badi = new struct LinkedList;
temp->badi->data = 98;
temp->badi->badi = NULL;
// slide #2, ezaafe kardane onsore 56
jadid = new struct LinkedList;
jadid->adad = 56;
jadid->badi = sar;
sar = jadid;
}