Permalink
Browse files

Write ccc 2012 Junior problem 2

  • Loading branch information...
1 parent 977a731 commit ea1e6ed0b93ae68305f3372d9ef728d9f13d14c9 @neilparikh committed Nov 23, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 ccc/2012/j2.rb
View
@@ -0,0 +1,16 @@
+# all test cases passed
+
+a = gets.to_i
+b = gets.to_i
+c = gets.to_i
+d = gets.to_i
+
+if a == b && a == c && a == d
+ puts "Fish At Constant Depth"
+elsif a < b && b < c && c < d
+ puts "Fish Rising"
+elsif a > b && b > c && c > d
+ puts "Fish Diving"
+else
+ puts "No Fish"
+end

0 comments on commit ea1e6ed

Please sign in to comment.