Help us understand the problem. What is going on with this article?


More than 1 year has passed since last update.

perl (5.18.2 で確認)

perl -E 'say"$_月は横浜で酒が飲めるぞ"for(1..12)'


ruby -e '12.times{|i|puts"#{i+1}月は横浜で酒が飲めるぞ"}'


echo -e {1..12}月は横浜で酒が飲めるぞ"\n"

python3 (3.7.2 で確認)

python3 -c 'for n in range(1, 13): print(f"{n}月は横浜で酒が飲めるぞ")'

emacs-lisp (GNU Emacs 26.1 で確認)

(require 'cl)(let ((x 0))(while (< x 12) (cl-incf x)(insert (format "%d月は横浜で酒が飲めるぞ\n" x))))

php (PHP 5.6.30 で確認)

php -r 'for($i=1;$i<13;$i++){echo $i."月は横浜で酒が飲めるぞ\n";}'

Elixr (1.6.4 で確認)

elixir -e "1..12 |>\"#{&1}月は横浜で酒が飲めるぞ\n\")) |> IO.puts"

MySQL版 (MySQL 8 で確認)

CREATE DATABASE s;CREATE TABLE s.y (m int auto_increment, PRIMARY KEY (`m`));INSERT INTO s.y value (),(),(),(),(),(),(),(),(),(),(),();SELECT CONCAT(m, '月は横浜で酒が飲めるぞ') FROM s.y;DROP DATABASE s;

PostgreSQL (9.3 で確認)

psql -c "WITH RECURSIVE seq(i) AS (SELECT 1 UNION ALL SELECT i + 1 FROM seq WHERE i < 12) SELECT i || '月は横浜で酒が飲めるぞ' FROM seq;"

JavaScript (node.js v10.14.2)

node -e "for(let i=1;i<13;i++)console.log(i+'月は横浜で酒が飲めるぞ')"

Haskell (ghc8.4.4)

ghc -e 'mapM_ (\n-> putStrLn $ show n ++ "月は横浜で酒が飲めるぞ") [1..12]' 

GAWK(GNU Awk 4.1.3)

gawk 'BEGIN{for(i=1;i<13;i++) print i"月は横浜で酒が飲めるぞ"}'

ジャバ (OpenJDK11)

echo "IntStream.range(1, 13).forEach(m -> printf(\"%d月は横浜で酒が飲めるぞ\n\", m));" | jshell PRINTING -
JavaScript/jQuery/Perl 5/PHP 5/CakePHP 2,3/MySQL/Postgresql/MQTT/IoT/電子工作/DIY/makers
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away