From 1cc00b9cfd118e9a31f0a02279c14c0e8f1dac26 Mon Sep 17 00:00:00 2001 From: Joonatan Vuorela Date: Wed, 20 Jan 2016 11:55:44 +0200 Subject: [PATCH] vko3 --- koodi.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 koodi.rb diff --git a/koodi.rb b/koodi.rb old mode 100644 new mode 100755 index 932f2b3..dd8c79d --- a/koodi.rb +++ b/koodi.rb @@ -1 +1,7 @@ -# kirjoita koodi tänne +def kertoma(luku) +kertoma = 1 + for i in 1..luku + kertoma = kertoma * i + end +return kertoma +end \ No newline at end of file