|
-
February 4th, 2003, 08:45 AM
#1
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
-
February 4th, 2003, 11:49 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|