{
  "type": "code_options",
  "author": "csdn.net",
  "source": "solution.md",
  "exercise_id": "3a4cd3d0b4984206a8894f5a5a5f8698",
  "keywords": "区间树,算法中阶,数据结构,数据结构的扩张",
  "title": "由数值大小在闭区间的",
  "desc": [
    {
      "content": "\n<p>创建一个大小为 100 的整型数组&#xff0c;数组元素由数值大小在闭区间[0,1000]内的\n随机数组成。在控制台窗口中输出数组内数值为 7 的倍数&#xff0c;且除以 3 余数为 2 的\n元素。若数组中不存在符合规则的元素&#xff0c;则在控制台中给出相应提示</p>",
      "language": "markdown"
    }
  ],
  "answer": [
    {
      "content": "",
      "language": "cpp"
    }
  ],
  "prepared": [
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ],
    [
      {
        "content": "",
        "language": "cpp"
      }
    ]
  ],
  "template": {
    "content": "#include <stdio.h>\n#include <stdlib.h>\nint main()\n{\n\tint a[100];\n\tint i,nmb = 0;\n\tfor(i = 0;i<100;i++)\n\t\ta[i] = rand()%1001;\n\tfor (i = 0;i<100;i++)\n\t{\n\t\tif( (a[i]%7 == 0) && (a[i]%3 ==2) )\n\t\t{\n\t\t\tprintf(\"%5d\",a[i]);\n\t\t\tnmb++;\n\t\t}\n\t}\n\tprintf(\"\\n\");\n\tif(nmb == 0)\n\t\tprintf(\"没有符合条件的数\\n\");\n\treturn 0;\n}",
    "language": "cpp"
  },
  "node_id": "dailycode-64982f9ba8dd444da2c236c7f074dab0",
  "license": "csdn.net",
  "created_at": 1637894160,
  "topic_link": "https://bbs.csdn.net/topics/600469937"
}