fork download
  1. #真下のこの文は後で説明する
  2. from strutils import parseInt
  3.  
  4. echo "数字を入力してください: "
  5. let n = parseInt(readLine(stdin))
  6. case n
  7. of 0..2, 4..7: echo "入力した数字は以下の集合に属しています: {0, 1, 2, 4, 5, 6, 7}"
  8. of 3, 8: echo "入力した数字は3か8です"
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3
compilation info
prog.nim(6, 1) Error: not all cases are covered
stdout
Standard output is empty