{
  "type": "code_options",
  "author": "csdn.net",
  "source": "solution.md",
  "exercise_id": "39df61b61382450a935caa80cb7c1b32",
  "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数",
  "title": "计算阶乘的和",
  "desc": [
    {
      "content": "\n<p>计算1!-2!&#43;3!-4!&#43;5!-6!&#43;7!-8!&#43;9!-10!,并输出计算结果</p>",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "cpp"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ]
  ],
  "template": {
    "content": "#include \"stdio.h\"\ndouble fun(int n)\n{\n\tdouble sum=1.0;\n\tint i;\n\tfor(i=1;i<=n;i++)\n\t\tsum*=i;\n\treturn sum;\n}\nint main()\n{\n\tint i,mark=1;\n\tdouble sum=0,item=0;\n\tfor(i=1;i<=10;i++)\n\t{\n\t\titem=mark*fun(i);\n\t\tsum+=item;\n\t\tmark=-mark;\n\t}\n\tprintf(\"1!-2!+3!-4!+5!-6!+7!-8!+9!-10!=%.0lf\\n\",sum);\n}",
    "language": "cpp"
  },
  "node_id": "dailycode-fc25afd2c08745858aec1f80a7c630d6",
  "license": "csdn.net",
  "created_at": 1637894160,
  "topic_link": "https://bbs.csdn.net/topics/600469867"
}