From adcb06901dfe635b8426cf4e61dd36aa663de9ed Mon Sep 17 00:00:00 2001 From: JohannaUha Date: Tue, 17 Jan 2017 19:27:09 +0200 Subject: [PATCH] teht8 --- koodi.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koodi.rb b/koodi.rb index f6a6e73..0299d37 100644 --- a/koodi.rb +++ b/koodi.rb @@ -1 +1,7 @@ -# kirjoita koodi tänne \ No newline at end of file +def osa(taulu) + taulu.reject{|a| a<=taulu.at(0)} +end + +taulu = [3, 2, 1, 5, 7] + +puts osa(taulu) \ No newline at end of file