View previous topic :: View next topic
|
Author |
Message |
torrind
New User
Joined: 09 May 2020 Posts: 2 Location: UK
|
|
|
|
Hi All,
My first time here!
I'm a student seconded to a Large bank in the UK as part of my course and I'm learning COBOL in my spare time (GNU COBOL). As a project, I'm writing a simple airline booking program and have got quite far. The help I need is as follows:
If I have a 100 seater aeroplane setup as 4 rows of 25 seats, I want to be able to read the seat numbers in from a file and display where they are booked on this 4 x 25 grid as follows:
row1: xxxxxxxxx*xxxxx*xxxxxxx*x
row2: xxxxxxxxxxxxxxxxxxxxxxxxx
row3: xxxxxxxxxxxxxxxx**xxxxxxx
row4: xxxxxxxxxx*xxxxxxxxxxxxx*
In this example row 1 shows seats 10, 16 and 24 as booked
row 3 - seats 67 & 68 are booked
row 4 - seats 86 & 100 are booked (x's are empty seats)
Can anyone help with a simple way of doing this? I've been at this for weeks with no real success.
Thanks in advance,
Darren |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Funny sort of airplane! Do you mean 25 rows of 4 seats per row?
In any event, SergeyKen is correct - you are not an expert so really should be in the Beginners Forum. |
|
Back to top |
|
|
torrind
New User
Joined: 09 May 2020 Posts: 2 Location: UK
|
|
|
|
Hi All,
Apologies for posting this in the wrong forum - I'm new to all this and didn't realise.
Thanks for the feedback guys.
Darren |
|
Back to top |
|
|
|