RosettaCodeData/Task/Conditional-structures/Smalltalk/conditional-structures-1.st

12 lines
313 B
Smalltalk
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
balance > 0
ifTrue: [Transcript cr; show: 'still sitting pretty!'.]
ifFalse: [Transcript cr; show: 'No money till payday!'.].
balance < 10 ifTrue:[ self goGetSomeMoney ].
balance > 1000 ifTrue:[ self beHappy ].
(balance < 10)
ifFalse:[ self gotoHappyHour ]
ifTrue:[ self noDrinksToday ].