Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "first"
- 1 to: 6 do: [:i |
- 1 to: i do: [:j |
- Transcript show: (i odd ifTrue: j ifFalse: i-j+1);
- show: (i=j ifTrue: '' ifFalse: $-)].
- Transcript cr].
- "and second, in one line"
- 1 to:6 do:[:i|1 to:i do:[:j|Transcript show:(i odd ifTrue:j ifFalse:i-j+1);show:(i=j ifTrue:''ifFalse:$-)].Transcript cr].
Add Comment
Please, Sign In to add comment