{ "question_id": 7457297, "question_title": "找出小于平均值的数。", "question_content": "
从键盘输入一个正整数存入变量n中,再输入n个整数,然后找出所有小于平均值的数,并按输入顺序输出。\n \n
", "difficulty": "简单", "answer_id": 53441440, "answer_content": "\n#include<stdio.h>\n\nint main()\n{\n\tint i,n,x,sum=0,a[100];\n\tfloat ave;\n\tscanf("%d",&n);\n\tfor(i=0;i<n;i++){\n scanf("%d",&a[i]);\n sum+=a[i];\n\t}\n\tave=sum*1.0/n;\n\tfor(i=0;i<n;i++){\n if(a[i]<ave)\n printf("%d",a[i]);\n\t}\n\n\treturn 0;\n\n}\n
\n\n\n", "tag_name": "c语言", "cpp": "#include