[from now] 2014/12/09 14:46:23

diff --git a/ITP1_4_B.rb b/ITP1_4_B.rb
new file mode 100644
index 0000000..0edbaae
--- /dev/null
+++ b/ITP1_4_B.rb
@@ -0,0 +1,6 @@
+r = gets.to_f
+
+s = (r ** 2) * Math::PI
+l = 2 * r * Math::PI
+
+puts "#{s} #{l}"
diff --git a/ITP1_4_C.rb b/ITP1_4_C.rb
new file mode 100644
index 0000000..b2aab4a
--- /dev/null
+++ b/ITP1_4_C.rb
@@ -0,0 +1,4 @@
+ARGF.each_line do |line|
+  break if line =~ /\?/
+  puts eval(line)
+end
diff --git a/ITP1_4_D.rb b/ITP1_4_D.rb
new file mode 100644
index 0000000..7fe2cb9
--- /dev/null
+++ b/ITP1_4_D.rb
@@ -0,0 +1,8 @@
+gets
+ar = gets.split.map(&:to_i)
+
+min = ar.min
+max = ar.max
+sum = ar.inject(:+)
+
+puts [min, max, sum].join("\s")
diff --git a/ITP1_5_A.rb b/ITP1_5_A.rb
new file mode 100644
index 0000000..ec220ef
--- /dev/null
+++ b/ITP1_5_A.rb
@@ -0,0 +1,12 @@
+def print_rect(h, w)
+  h.times do
+    puts "#" * w
+  end
+  puts
+end
+
+ARGF.each_line do |line|
+  break if line =~ /0 0/
+  h, w = line.split.map(&:to_i)
+  print_rect(h, w)
+end
commit