aboutsummaryrefslogtreecommitdiff
path: root/challenge-060/shawak
diff options
context:
space:
mode:
authorMaximilian <Shawak@users.noreply.github.com>2020-05-12 16:55:18 +0200
committerGitHub <noreply@github.com>2020-05-12 16:55:18 +0200
commitc16f9671536e93c9eaf0869311513684bc5d07fa (patch)
tree58643d1abef2eeda41ac695b1d17333d65feccd6 /challenge-060/shawak
parent6d4b1f3e3b9ec173194372bd43386c27bea638ce (diff)
downloadperlweeklychallenge-club-c16f9671536e93c9eaf0869311513684bc5d07fa.tar.gz
perlweeklychallenge-club-c16f9671536e93c9eaf0869311513684bc5d07fa.tar.bz2
perlweeklychallenge-club-c16f9671536e93c9eaf0869311513684bc5d07fa.zip
task 1 solution
Diffstat (limited to 'challenge-060/shawak')
-rw-r--r--challenge-060/shawak/ruby/ch-1.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-060/shawak/ruby/ch-1.rb b/challenge-060/shawak/ruby/ch-1.rb
new file mode 100644
index 0000000000..c325f4e24a
--- /dev/null
+++ b/challenge-060/shawak/ruby/ch-1.rb
@@ -0,0 +1,10 @@
+s=gets.chomp
+r=?@
+if s=~/\d+/ then
+s.to_i.times{r=r.succ}
+puts r
+else
+i=1
+(i+=1)while((r=r.succ)!=s)
+p i
+end