-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex6.rb
39 lines (30 loc) · 763 Bytes
/
ex6.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name1="Ben"
name2="Joe"
puts "Hello, #{name1}, where is #{name2}?"
puts "."*10
end1="Z"
end2="d"
end3="r"
end4="a"
end5="v"
end6="o"
puts end1+end2+end3+end4+end5+end6
formatter="%s %s %s %s"
puts formatter %[1, 2, 3, 4]
puts formatter %["one", "two", "three", "four"]
puts formatter % [true, false, true, false]
puts formatter %[formatter, formatter, formatter, formatter]
puts formatter %[
"I had this thing.",
"That you could type up right.",
"But it did't sing.",
"So I said goodnight."]
days="mon, tue, wed, thr, fri, sat, sun"
months="jan\nfeb\nmar\napr"
puts "here are the days", days
puts "here are the days #{days}"
puts "here are the months", months
puts <<PARAGRAPH
there is someting going on here.
With the PARAGRAPH thing.
PARAGRAPH