Results 1 to 2 of 2

Thread: tacket booking system in c++

  1. #1
    hussain king is offline Senior Member+
    Last Online
    4th April 2019 @ 06:44 AM
    Join Date
    14 Feb 2018
    Gender
    Male
    Posts
    100
    Threads
    42
    Credits
    -1,186
    Thanked
    2

    Thumbs up tacket booking system in c++

    #include<iostream>
    #include<conio.h>
    #include<iomanip>
    void line();
    using namespace std;
    class tacket_system{
    private:
    int price,total_price,discount,family_member,member;
    public:
    void family_tacket()
    {
    cout<<"------------------------------"<<endl;
    cout<<"wellcome to family tacket system="<<endl;
    cout<<"------------------------------"<<endl;
    cout<<"please enter your family member=";
    cin>>family_member;
    cout<<endl;
    cout<<"please enter your price per person=";
    cin>>price;
    cout<<endl;
    cout<<"Enter discount 20%rate=";
    cin>>discount;
    if(family_member<=20)
    {
    price=family_member*price;
    price=price-discount;
    cout<<endl;
    cout<<"------------------------------"<<endl;
    cout<<"your payable price is ="<<price<<endl;
    cout<<"------------------------------"<<endl;


    }else if(family_member>=8)
    {
    price=family_member*price;
    price=price-discount;
    cout<<endl;
    cout<<"------------------------------"<<endl;
    cout<<"your payable price is ="<<price<<endl;
    cout<<"------------------------------"<<endl;

    }
    else if(family_member<7) {

    cout<<"discount rate is not avaliable discount rate is apply family member must be greater than 7"<<endl;
    cout<<"------------------------------"<<endl;
    cout<<"your price is "<<family_member*price<<endl;
    cout<<"------------------------------"<<endl;
    }
    }

    void without_family()
    {
    cout<<"--------------------------------------"<<endl;
    cout<<"WELLCOME TO WITHOUT FAMILY DEAL SYSTEM"<<endl;
    cout<<"--------------------------------------"<<endl;
    cout<<"please enter your price ";
    cin>>price;
    cout<<endl;
    cout<<"please enter your member =";
    cin>>member;
    cout<<endl;
    price=price*member;
    cout<<"------------------------------"<<endl;
    cout<<"your total price is ="<<price<<endl;
    cout<<"------------------------------"<<endl;
    }
    };
    int main()
    {
    tacket_system s1,s2;
    line();
    cout<<setw(70)<<"WELLCOME TO TACKET BOOKING SYSTEM"<<endl;
    line();
    cout<<setw(70)<<"1: family tacket deal"<<endl;
    cout<<setw(78)<<"2: without family tacket deal"<<endl;

    cout<<"please enter your choice =";
    int choice;
    cin>>choice;
    if(choice==1)
    {
    s1.family_tacket();

    }else if(choice==2)
    {
    s1.without_family();

    }
    else{
    cout<<"invilid option select"<<endl;
    cout<<"please try again --"<<endl;
    }



    }
    void line()
    {
    cout<<setw(70)<<"---------------------------------"<<endl;
    }
    Attached Images Attached Images  

  2. #2
    Join Date
    09 Apr 2009
    Location
    KARACHI&
    Gender
    Male
    Posts
    19,307
    Threads
    412
    Credits
    39,753
    Thanked
    1813

    Default

    بہت شکریہ برادر ہما رے ساتھ شئیر کرنے کا

Similar Threads

  1. Huawei air mate 9 online booking and win exiting prize
    By Yaseen Ahmad in forum General Mobile Discussion
    Replies: 4
    Last Post: 3rd January 2017, 02:57 PM
  2. need a web for air tickets booking
    By talhaghazi in forum Ask an Expert
    Replies: 0
    Last Post: 28th September 2015, 01:20 AM
  3. ~* Ufone Online Number Booking Service *~
    By Tanweer in forum General Mobile Discussion
    Replies: 72
    Last Post: 9th November 2012, 01:30 PM
  4. Air Lines Ticket Booking
    By Hafiz Abdul Quddus in forum Ask an Expert
    Replies: 1
    Last Post: 19th March 2011, 03:03 PM
  5. HOW TO READ PNR OF AIRLINE BOOKING ??? (from BAAZIGAR)
    By Baazigar in forum Ask an Expert
    Replies: 1
    Last Post: 19th October 2009, 02:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •