题目内容

给定程序MODll.C中函数fun的功能是:计算n的5次方的值(规定n的值大于2、小于8),通过形参指针传回主函数;并计算该值的个位、十位、百位上数字之和作为函数值返回。
例如,7的5次方是16807,其低3位数的和值是15。
请改正函数fun中指定部位的错误,使它能得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构!

查看答案
更多问题

阅读下列程序说明和C代码,将应填人(n)处的字句写在对应栏内。
[程序5说明]
下列文法可用来描述化学分子式的书写规则(例如,A12(CO3)3”Cu(OH)2):
λ→β\βλ
β→δ\δn
δ→ξ\ξθ\(λ)
其中:λ是—个分子式;δ或是一个元素,或是一个带括号的(子)分子式,元素或是一个大写字母(记为ξ),或是一个大写字母和一个小写字母(记为ξθ)β或是一个δ,或是在δ之后接上一个整数n,δn表示β有n个δ的元素或(子)分子式。—个完整的分子式由若干个β组成。
当然一个正确的分子式除符合上述文法规则外,还应满足分子式本身的语义要求。
下面的程序输入分子式,按上述文法分析分子式,并计算出该分子式的分子量。例如:元素H的原子量是1,元素O的原子量是16。输入分子式H2O,程序计算出它的分子量为18 (1×2+16)。程序中各元素的名及它的原子量从文件atom.dat中读入。
[程序5]
include < stdio. h >
include < string. h >
define MAXN 300
define GMLEN 30
struct elem { char name[ ]; /* 元素名*/
double v;/*原子量*/
} nTbl [MAXN];
char cmStr [GMLEN], * pos;
int c;FILE * fp;
double factor();
double atom() /* 处理文法符号δ*/
{char w [3];int i; double num;
while((c = * pos++) =='||c =='\t'); /*略过空白字符*/
if(c == '\n') return 0.0;
if(c>='A' && C <='Z') {/*将元素名存入W */
w[i =0]=c;c= * pos ++
if(c >='a'&& c <='z')w[ ++i] =c;else pos--;
w[ ++i] ='\0',
for(i =0;nTbl [i]. v >0.0;i ++)
if(strcmp (w,nTbl[i]. name) ==0) return nTbl [i]. v;
printf (" \n元素表中没有所输入的无素: \t%s\n',w); retur n - 1.0;
} elseif (c = ='(') {
if((num=(1)) <0.0)return -l.0; /*包括可能为空的情况*/
if(* pos ++ ! = ')') { printf (" 分子式中括号不匹配!/n") ;return - 1.0; }
return num;
}
printf ("分子式中存在非法字符:\t%c\n" ,c);
return - 1.0;
}
double mAtom() /* 处理文法符号β*/
{ double num ;int n = ];
if((num=(2)) <0.0)return-l.0;
c= *pos++;
if(c >='O'&&c <='9') {
n = 0; while(c > = 0&&c < ='9')
{n=(3);
c= *poss ++;
}
}
pos --;
return num * n;
}
double factor() /*处理文法符号λ*/
{ double num =0.0,d;
if((hum = mAtom ()) < 0.0) return - 1.0;
while(* pos >= 'A'&& * pos <= 'Z'||* pos == '(') {
if((d=(4)) <0.0)return-1.0;
(5);
} return num;
void main()
{ char fname[ ] ="atom. dst"; /*元素名及其原子量文件*/
int i;double num;
if((fp=fopon(fname,"r" )) == NULL) { /*以读方式打开正文文件*/
prinff("Can net open%s file. \n' ,fname) ;return /*程序非正常结束 */
i=0;
while(i < MAXN&&fscanf (fp," %s%lf,bTbl[i]. name,&nTbl[i]. v) ==2)
i++;
fclose(fp) ;nTbl[i]. v =-1.0;
while(1) [/*输入分子式和计算分子量循环,直至输入空行结束*/
printf(" \n 输入分子式! (空行结束) \n" ) ;gets(cmStr);
pos = cmStr;
if(cmStr[0] == '\0') break;
if((num = later() ) > 0.0)
if(* pos! = '\0')printf("分子式不完整! \n" );
else printf("分子式的分子量为%f\n",num);
}

The Writing section tests your ability to write essays in English similar to those that you would write in college courses.
During the test, you will write two essays. The integrated essay asks for your response to an academic reading passage and a lecture on the same topic. You may take notes as you read and listen, but notes are not graded. You may use your notes to write the essay. The lecture will be spoken, but the directions and the questions will be written. You will have 20 minutes to plan, write, and revise your response. Typically, a good essay for the integrated topic will require that you write 150-225 words.
The independent essay usually asks for your opinion about a familiar topic. You will have 30 minutes to plan, write, and revise your response. Typically, a good essay for the independent topic will require that you write 300-350 words.
A clock on the screen will show you how much time you have to complete each essay.
Integrated Essay "Primordial Soup"
You have 20 minutes to plan, write, and revise your response to a reading passage and a lecture on the same topic. First, read the passage and take notes. Then, listen to the lecture and take notes. Finally, write your response to the writing question. Typically, a good response will require that you write 150-225 words.
The origin of life was highly speculative until a graduate student at the University of Chicago, Stanley Miller designed and conducted an empirical research project under the guidance of his graduate advisor, Harold Urey. In this classic experiment, the researchers tried to simulate the chemical evolution process that generated life. Miller and Urey took a five-liter flask half filled with water and connected it with glass tubing to another flask into which they inserted tungsten electrodes. They then mixed methane, hydrogen, and ammonia into the water in the lower flask and heated it to induce evaporation, while at the same time subjecting it to continuous electrical charges that jumped across the space between the electrodes in the upper flask. The atmosphere was cooled again so that the water could condense and trickle back into the first flask in a continuous cycle. In this way, they sought to recreate the conditions in the early atmosphere of Earth, which they speculated was probably subjected to powerful electrical storms. In about an hour, the water turned orange. At the end of the first week, they observed that almost 15 percent of the carbon was converted into organic compounds. After several weeks, the liquid in the flask clouded and then gradually turned a dark brown. When they analyzed it, Miller and Urey found that it contained a large number of amino acids, which form. one of the basic structures of living organisms. They then hypothesized that the amino acids that they had created in the laboratory might be typical of the chemical mixture of the early oceans on Earth, and further, that additional amino acids could have been added to the mixture in the early oceans by carbon enriched meteorites or comets.
When the scientific results were popularized, the mixture became known as "primordial soup." However, much was still unknown about the process that caused the first cell to develop within the soup. The molecules produced were relatively simple organic molecules, not a complete living biochemical system. Nevertheless, the experiment established that natural processes could produce the building blocks of life without requiring life to synthesize them in the first place. The experiment served as inspiration for a large number of further investigations.
Model Test 6, Writing Section, Audio-09, Track 3
Now listen to a lecture on the same topic as the passage that you have just read.
Question
Summarize the main points in the reading passage, explaining how the lecture casts doubt on the ideas.

国内最大高炉4350m3高炉建设的特点是:场地狭窄,工种繁多,高空地下立体交叉作业,最高处达119m高。作业现场又有多条铁路通过,与一般建设工程相比,施工中的不安全因素更大,安全管理工作更为复杂,搞好施工安全管理,保护职工在施工中的安全和健康,不仅是安全管理的首要责任,也是调动职工积极性的必要条件。由于坚持“安全第一,预防为主”的方针,创造和保持了安全的施工环境,群众积极性高涨,实现了施工的高效性。由于做好了安全技术管理工作,也实现了无死亡事故,无重伤事故,月均个人负伤率控制在0.2以内。
问题:
①安全管理机构的健全及其在施工中应有的地位,强化安全管理体系,是搞好安全工作的重要工作,试问:如何建立安全管理体系?
②针对高炉工程施工的特点:试问该如何防止高空坠落事故的发生?

简述年度生产计划的制定和组成。

答案查题题库