...

  • ۱
  • ۰
#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;
}

  • ۹۴/۰۲/۱۱
  • حسین شفیعی

نظرات (۰)

هیچ نظری هنوز ثبت نشده است

ارسال نظر

ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی
تمامی حقوق این سایت طبیعتا مال همین سایته و کپی مطالب تنها با ذکر منبع مجاز می باشد