CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    9

    function to reserve seat on a plane

    i have an algoritm here for reserving a seat on a plane ...having trouble codding it....
    //function to reserve a seat in first class which has 5 rows with 4 seats in each row....a seat is defined by its row number and column letter E.G........ function must return 1 or 0 if successfull
    A B---C D
    FUNCTION PROTOTYPE
    reserve(int row,char col,char* travelclass)

    algorithm
    1. for the travel class being FIRSTCLASS
    print 'welcome'
    print 'passengers name'
    enter name
    print 'passengers surname'
    enter sname

    enter a valid row number
    enter a valid column

    if status is equal to unreserved
    assign row and column to passengers name
    print 'seat---- is reserved by-----

    else
    print'seat is already taken

    END

    any help would be deeply appreciated

  2. #2
    Join Date
    Aug 1999
    Location
    England
    Posts
    67
    Try ringing up to book instead...

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured