diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2021-03-21 19:47:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-21 19:47:19 +0100 |
| commit | d6fa1ad40bf74696bb090391a9acc3bff9bfdb0e (patch) | |
| tree | 486ceb734d1904fcae6e8e546ab0329873b420a3 /challenge-104 | |
| parent | a08644f04957eb68ca1b7f11a60d6a85c6e8c02a (diff) | |
| parent | 41bc88bab24c32edbf419bf3770225479e24e17e (diff) | |
| download | perlweeklychallenge-club-d6fa1ad40bf74696bb090391a9acc3bff9bfdb0e.tar.gz perlweeklychallenge-club-d6fa1ad40bf74696bb090391a9acc3bff9bfdb0e.tar.bz2 perlweeklychallenge-club-d6fa1ad40bf74696bb090391a9acc3bff9bfdb0e.zip | |
Merge pull request #3754 from Abigail/abigail/week-104
Abigail/week 104
Diffstat (limited to 'challenge-104')
| -rw-r--r-- | challenge-104/abigail/README.md | 3 | ||||
| -rw-r--r-- | challenge-104/abigail/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-104/abigail/blog1.txt | 1 | ||||
| -rw-r--r-- | challenge-104/abigail/c/ch-2.c | 1 | ||||
| -rw-r--r-- | challenge-104/abigail/ruby/ch-2.rb | 2 |
5 files changed, 6 insertions, 2 deletions
diff --git a/challenge-104/abigail/README.md b/challenge-104/abigail/README.md index 732bfaf812..a7f5fd70fd 100644 --- a/challenge-104/abigail/README.md +++ b/challenge-104/abigail/README.md @@ -69,7 +69,7 @@ the solution. * [Tcl](tcl/ch-1.tcl) ### Blog - +[Perl Weekly Challenge 104: FUSC Sequence](https://wp.me/pcxd30-vx) ## [NIM Game](https://perlweeklychallenge.org/blog/perl-weekly-challenge-104/#TASK2) Write a script to simulate the NIM Game. @@ -117,3 +117,4 @@ After the third move, we print that the computer has won. * [Scheme](scheme/ch-2.scm) ### Blog +[Perl Weekly Challenge 104: NIM Game](https://wp.me/pcxd30-w5) diff --git a/challenge-104/abigail/blog.txt b/challenge-104/abigail/blog.txt new file mode 100644 index 0000000000..69175b63d7 --- /dev/null +++ b/challenge-104/abigail/blog.txt @@ -0,0 +1 @@ +https://wp.me/pcxd30-vx diff --git a/challenge-104/abigail/blog1.txt b/challenge-104/abigail/blog1.txt new file mode 100644 index 0000000000..291e8b75a0 --- /dev/null +++ b/challenge-104/abigail/blog1.txt @@ -0,0 +1 @@ +https://wp.me/pcxd30-w5 diff --git a/challenge-104/abigail/c/ch-2.c b/challenge-104/abigail/c/ch-2.c index e254b5bacf..04e26f7b3b 100644 --- a/challenge-104/abigail/c/ch-2.c +++ b/challenge-104/abigail/c/ch-2.c @@ -33,6 +33,7 @@ int main (void) { } printf ("Computer wins\n"); + free (line); return (0); } diff --git a/challenge-104/abigail/ruby/ch-2.rb b/challenge-104/abigail/ruby/ch-2.rb index f07ef08604..dc87ccb015 100644 --- a/challenge-104/abigail/ruby/ch-2.rb +++ b/challenge-104/abigail/ruby/ch-2.rb @@ -19,7 +19,7 @@ while tokens > 0 do if 1 <= take && take <= max_take then takes = max_take + 1 - take printf "Computer takes %d token%s\n", takes, takes == 1 ? "" : "s" - tokens -= 4 + tokens -= (max_take + 1) end end |
