#Include Using Namespace Struct Int Struct Struct
#Include Using Namespace Struct Int Struct Struct
struct tree
{
int roll;
struct tree * left;
struct tree * right;
};
}
else
{
temp=temp->right;
}
}
}
}
}
void display(struct tree* temp)
{
cout<<temp->roll<<endl;
}
if(temp==NULL)
{
;
}
else
{
LVR(temp->left);
display(temp);
LVR(temp->right);
}
}
void main()
{
int choice;
while(1)
{
cout<<"1 - Insert "<<endl;
cout<<"2 - Display "<<endl;
cout<<"3 - Exit "<<endl;
cout<<"\t \t ENTER YOUR CHOICE :";
cin>>choice;
if(choice==1)
{
struct tree *cur;
cur = new tree();
cout<<"\t \t Enter Roll Number :";
read(cur);
insert(cur);
}
else if(choice==2)
{
LVR(root);
}
else if(choice==3)
{
break;
}
}
}