2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

概要

paiza.ioでelixirやってみた。
Forth、見つけたのでやってみた。
練習問題やってみた。

参考にしたページ

練習問題

Forthで数9を4個つかって1から15までの数を表す式を実行せよ。

サンプルコード

9 9 - 9 9 / .
9 9 / 9 9 / + .
9 9 + 9 + 9 / .
9 9 9 + 9 / dup + .
9 9 9 + 9 / dup + - .
9 dup 9 + 9 + 9 / - .
9 9 9 + 9 / - .
9 9 9 drop 9 / - .
9 9 - 9 * 9 + .
9 9 / 9 dup 9 / + .
9 9 9 + 9 / + .
9 dup 9 9 + + 9 / + .
9 9 9 + 9 / dup + + .
9 dup 9 9 + 9 / dup + - + .
9 dup dup 9 + 9 + 9 / - + .
bye


実行結果

Forth in Elixir
? 1 ok
? 2 ok
? 3 ok
? 4 ok
? 5 ok
? 6 ok
? 7 ok
? 8 ok
? 9 ok
? 10 ok
? 11 ok
? 12 ok
? 13 ok
? 14 ok
? 15 ok
? May the Force be with you bye

成果物

以上。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?