{
  "type": "code_options",
  "author": "csdn.net",
  "source": "solution.md",
  "exercise_id": "1cc2af8b030c41f687a7d0308bcbd9be",
  "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数",
  "title": "按要求完成数据的输入输出",
  "desc": [
    {
      "content": "\n<p>有6个学生&#xff0c;每个学生的数据包括学号、姓名、3门课的成绩、平均成绩&#xff0c;输入每个学生的信息&#xff0c;平均成绩需通过计算得出&#xff0c;输出学生的信息。要求&#xff1a;输入、输出不使用函数。</p>",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "cpp"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ]
  ],
  "template": {
    "content": "#include<stdio.h>\n#include<string.h>\n#include<stdlib.h>\nint n;\nstruct person\n{\n\tchar id [20];\n\tchar name [20];\n\tint s1,s2,s3;\n\tint sum;\n\tfloat ave;\n} p[100];\nint main()\n{\n\tint i,j,t,m;\n\tscanf(\"%d\",&n);\n\tfor(int i=0; i<n; i++)\n\t{\n\t\tp[i].sum=0;\n\t\tscanf(\"%s %s %d %d %d\",p[i].id,p[i].name,&p[i].s1,&p[i].s2,&p[i].s3);\n\t\tp[i].sum+=p[i].s1+p[i].s2+p[i].s3;\n\t\tp[i].ave=p[i].sum/3.0;\n\t}\n\tfor(i=0; i<n; i++)\n\t{\n\t\tprintf(\"%s %s %d %d %d %.2f\\n\",p[i].id,p[i].name,p[i].s1,p[i].s2,p[i].s3,p[i].ave);\n\t}\n}",
    "language": "cpp"
  },
  "node_id": "dailycode-58a48a2a35404ef68df4d1d487615e2a",
  "license": "csdn.net",
  "created_at": 1637894160,
  "topic_link": "https://bbs.csdn.net/topics/600469853"
}