{ "type": "code_options", "author": "csdn.net", "source": "solution.md", "exercise_id": "55656322f3944cb79f0d37a097b877bf", "keywords": "算法初阶,最小值和最大值,排序和顺序统计量,中位数和顺序统计量", "title": "求输入数字的平均值、最大值", "desc": [ { "content": "\n
输入若干个数,设输入的第一个数n为后面要输入的数的个数,求平均值及最大值,并在屏幕输出来
", "language": "markdown" } ], "answer": [ { "content": "", "language": "java" } ], "prepared": [ [ { "content": "", "language": "java" } ], [ { "content": "", "language": "java" } ], [ { "content": "", "language": "java" } ] ], "template": { "content": "import java.util.Scanner;\npublic class Test{\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tSystem.out.println(\"输入n:\");\n\t\tint n=in.nextInt();\n\t\tint temp,max=0,sum=0;\n\t\tfor(int i=0;i