热点快讯网 加入收藏  -  设为首页
您的位置:热点快讯网 > 艺术 > 正文
C语言编程 题目:输入30个学生成绩,求最高分,最低分和平均分(用数组存放数据)
C语言编程 题目:输入30个学生成绩,求最高分,最低分和平均分(用数组存放数据)
提示:

C语言编程 题目:输入30个学生成绩,求最高分,最低分和平均分(用数组存放数据)

#include intmain() { intmax,min,score; doubleavg=0; scanf("%d",&score); max=min=score; avg+=score; for(inti=0;i<29;i++) { scanf("%d",&score); if(score>max)max=score; if(score<min)min=score; avg+=score; } avg=avg/30; printf("最高分max=%d,最低分min=%d,平均分avg=%lf\n",max,min,avg); return0; } 文件输入/输出 在C语言中,输入和输出是经由标准库中的一组函数来实现的。在ANSI C中,这些函数被定义在头文件;中。 标准输入/输出 有三个标准输入/输出是标准I/O库预先定义的: stdin标准输入 stdout标准输出 stderr输入输出错误 以上内容参考:百度百科-c语言

c语言。输入10个学生课程成绩,输出最高分,最低分平均分
提示:

c语言。输入10个学生课程成绩,输出最高分,最低分平均分

#include "stdio.h"int main(){int buf[10] = {};int i;float max=-1,min=100;float sum = 0,average = 0;printf("输入10个学生的成绩:");for(i=0;i buf[i])min = buf[i];}average = sum/10;printf("最高成绩为:%.1f\n",max);printf("最低成绩为:%.1f\n",min);printf("平均成绩为:%.1f\n",average);return 0;【摘要】 c语言。输入10个学生课程成绩,输出最高分,最低分平均分【提问】 2. (12.0分) 4.1-2键盘输入10个学生的某门]课程的百分制成绩,输出他们的最高成绩、最低成绩和平均成绩例如:输入:11223344556677889989输出:最高成绩为: 99.0,最低成绩为: 11.0,平均成绩为: 58.4【提问】 完整的【提问】 #include "stdio.h"int main(){int buf[10] = {};int i;float max=-1,min=100;float sum = 0,average = 0;printf("输入10个学生的成绩:");for(i=0;i buf[i])min = buf[i];}average = sum/10;printf("最高成绩为:%.1f\n",max);printf("最低成绩为:%.1f\n",min);printf("平均成绩为:%.1f\n",average);return 0;【回答】 因为这个数据规模很小,只有10个人而已, 所以求平均分就直接利用if语句实现累加求和然后用除法了,如果规模大的话可以考虑其他方法哦。【回答】 如果您还有其他问题,可以截图给我哦【回答】 【提问】 #includeint main(){ int arr[3][3] = {}; int i = 0, j = 0; { for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { scanf("%d", &arr[i][j]); } } } for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { printf("%d ", arr[j][i]); } printf("\n"); } return 0;}【回答】

在线翻译:中文翻译成英文
提示:

在线翻译:中文翻译成英文

China is the world's largest coal production and consumption Country,and is also one of the few countries which regard coal as the main sources of energy ,the coal energy rates was very high among energy consumption structure rates in our country.Among them, most of the coal combustion for power generation and heating industry.For large coal-fired power station and boiler,Pulverized coal combustion is the main way of combustion.However, It's one of the most important factors which has restricted the sustainable development that the use of pulverized coal combustion efficiency is not high and the environmental pollution caused by burning of our country one of the most important factors.

Based on the coal combustion efficiency and low pollution comprehensive consideration," corona charged pulverized coal combustion mechanism and experiment research" is put forward.By means of high voltage electrostatic field on the solid particles and gas can produce electric charge effect,On one hand, the gas atoms or ions moving kinetic energy is very high,and when contact with the pulverized coal particles,it'll transferred part of energy to the coal particle surface, and lead to Particles in an unstable high-energy state , increased the particle surface activity; On the other hand, oxygen, carbon monoxide, corona methane gas ion, electron, has high energy, those make accelerate coal particle combustion reaction rate, reduce combustion reaction temperature become possible. However, in the actual production process of coal, coal is usually in a flow state. From theoretic analysis, the flow of pulverized coal combustion efficiency of pulverized coal is greater than under the static state, Therefore,the pulverized coal flow in charge of combustion enhancement is possible.

In this paper,on the basis of pulverized coal particles are charged successfully, through using of the original cyclone electrostatic charge system to build the pulverized coal flow injection charge combustion system. using a photographic record and analysis of its ignition and combustion state, using sampling thermal analysis method of burnout to exploring Charged pulverized coal flow combustion status.

Key words: corona discharge, the pulverized coal flow, combustion, thermal analysis

翻译了一会,还挺累,不说百分百准确,但是基本没什么大的语法错误,望采纳。

一间宿舍内有6位同学,求他们之中恰有2人的生日在同一月份的概率.用排列组合的方法算,谢谢
提示:

一间宿舍内有6位同学,求他们之中恰有2人的生日在同一月份的概率.用排列组合的方法算,谢谢

方法如下: 六个人放在12个月,总计12^6种方法。 六人中选出二人作为一个绑定:C(6,2),先放置他们。 这个绑定在12个月中有12种放置方法。 剩下的4个人放在剩下的11个月中,11*10*9*8种方法。 故而12*C(6,2)*P(11,4)/12^6。 概率,亦称“或然率”,它是反映随机事件出现的可能性大小。随机事件是指在相同条件下,可能出现也可能不出现的事件。例如,从一批有正品和次品的商品中,随意抽取一件,“抽得的是正品”就是一个随机事件。 设对某一随机现象进行了n次试验与观察,其中A事件出现了m次,即其出现的频率为m/n。经过大量反复试验,常有m/n越来越接近于某个确定的常数(此论断证明详见伯努利大数定律)。该常数即为事件A出现的概率,常用P (A) 表示。

一学生宿舍住有4名学生,则4人中至少有2人的生日在一周内的同一天的概率为多少?
提示:

一学生宿舍住有4名学生,则4人中至少有2人的生日在一周内的同一天的概率为多少?

答案是223/343。 一星期7天,俩人在同一天的概率为1/7X1/7,等于1/49,至少有两人就是说可能两人三人四人生日同一天,就是1/7的平方+1/7的三次方+1/7的四次方。 选法是→A7(下标)4(上标)1-A74/7的4次方=223/343。 概率的计算 是根据实际的条件来决定的,没有一个统一的万能公式。解决概率问题的关键,在于对具体问题的分析。然后,再考虑使用适宜的公式。 但是有一个公式是常用到的: P(A)=m/n “(A)”表示事件 “m”表示事件(A)发生的总数 “n”是总事件发生的总数