• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Another question... (1 Viewer)

Joined
Feb 3, 2006
Messages
75
Gender
Male
HSC
2007
A program is needed to choose mode of transport. A train is selected rather than a bus; however a taxi is chosen in preference to both when one is available.

Your thoughts? cheers.
 

*sparklez...

Member
Joined
Mar 5, 2006
Messages
45
Gender
Female
HSC
2006
KimmorleyKiller said:
A program is needed to choose mode of transport. A train is selected rather than a bus; however a taxi is chosen in preference to both when one is available.

Your thoughts? cheers.
i'm confused...what's the question??
 

*sparklez...

Member
Joined
Mar 5, 2006
Messages
45
Gender
Female
HSC
2006
KimmorleyKiller said:
Lol, sorry man

Just pseudocode for that
Oh!! so u want to know the pseudocode for that?? well that should be easy enough =]

BEGIN select mode of transport
IF taxi is available
THEN select taxi
ELSE select train or bus
IF train is available
THEN select train
ELSE select bus
ENDIF
ENDIF
END

i dunno...it seems about right...i know it'd be easier to programme though
 

Mountain.Dew

Magician, and Lawyer.
Joined
Nov 6, 2005
Messages
825
Location
Sydney, Australia
Gender
Male
HSC
2005
hmmm...little bit of a problem *sparklez...

1) the IF and THEN goes on one line
2) no need to add "select train or bus" after the ELSE in the 4th line

heres my solution:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top