{
  "format": "tokbit",
  "version": 1,
  "name": "Product of numbers",
  "main": [
    {
      "id": "u1",
      "kind": "declare",
      "name": "n",
      "type": "int"
    },
    {
      "id": "u2",
      "kind": "input",
      "target": "n",
      "prompt": "Up to which number?"
    },
    {
      "id": "u3",
      "kind": "declare",
      "name": "product",
      "type": "int",
      "init": "1",
      "comment": "The product starts at one: with zero it would always be zero."
    },
    {
      "id": "u4",
      "kind": "for",
      "variable": "i",
      "range": "1, n + 1",
      "body": [
        {
          "id": "u5",
          "kind": "assign",
          "target": "product",
          "value": "product * i"
        }
      ]
    },
    {
      "id": "u6",
      "kind": "output",
      "values": "\"The product of numbers 1 to\", n, \"is\", product"
    }
  ],
  "functions": [],
  "comment": "Solution to the task “Product instead of sum”: Compute the product 1 · 2 · … · n (the factorial). What must the variable you multiply into start with?",
  "screen": "fit"
}
