Permalink
Browse files

Write ccc 2012 Junior problem 3

  • Loading branch information...
1 parent ea1e6ed commit 0e50a1d7cafc9185697e66dcbaa95cb6244f9260 @neilparikh committed Nov 23, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 ccc/2012/j3.rb
View
@@ -0,0 +1,15 @@
+# all test cases passed
+
+k = gets.to_i
+
+k.times do
+ puts "#{'*' * k}#{'x' * k}#{'*' * k}"
+end
+
+k.times do
+ puts "#{' ' * k}#{'x' * k}#{'x' * k}"
+end
+
+k.times do
+ puts "#{'*' * k}#{' ' * k}#{'*' * k}"
+end

0 comments on commit 0e50a1d

Please sign in to comment.