#include "stdafx.h"
#include <iostream>
#include <conio.h>
using
namespace
std;
struct
node
{
int
data;
char
name [30];
char
family[30];
char
number[30];
node *next;
};
node *first;
node *last;
void
add(
int
);
void
del(
int
);
void
show();
void
format();
void
searchlist(
int
);
int
_tmain(
int
argc, _TCHAR* argv[])
{
int
ans;
int
a;
int
d;
while
(1)
{
cout<<
"\n 1-add 2-del 3-show 4-format list 5-searchlist (Enter |6| key to Exit) : "
;
cin>>ans;
if
(ans==1)
{
cout<<
"\nEnter Number for add : "
;
cin>>a;
add(a);
}
else
if
(ans==2)
{
cout<<
"\nEnter Number for del : "
;
cin>>d;
del(d);
}
else
if
(ans==3)
{
show();
}
else
if
(ans==4)
{
format();
cout<<
"END Life this linked list "
;
_getch();
break
;
}
else
if
(ans==5)
{
int
l;
cout<<
"\nEnter Number for search : "
;
cin>>l;
searchlist(l);
}
else
{
break
;
}
}
_getch();
return
0;
}