下列程序的功能是:利用以下所示的简单迭代方法求方程:cos(X)-X=0的一个实根。 Xn+1=cos(Xn) 迭代步骤如下: (1)取X1初值为0.0; (2)X0=X1,把X1的值赋给X0; (3)X1=cos(X0),求出一个新的X1; (4)若X0-X1的绝对值小于0.000001,执行步骤(5),否则执行步骤(2); (5)所求X1就是方程cos(X)-X=0的一个实根,作为函数值返回。 请编写函数countValue()实现程序的要求,最后调用函数writeDat(),把结果输出到OUT.DAT文件中。 注意:部分源程序已给出。 请勿改动主函数main()和输出数据函数writeDat()的内容。 #include<conio.h> #include<math.h> #include<stdio.h> float countValue() void writeDat() FILE*wf; wf=fopen("OUT.DAT","w"); fprintf(wf,"%f\n",countValue()); fclose(wf); main() printf("实根=%f\n",countValue()); printf("%f\n",cos(countValue())-countValue()); writeDat();
查看答案
关于明朝“缇骑”的叙述,不正确的是()
A. 设立于明成祖在位时期
B. 兼管侦察、逮捕和审讯事务
C. 超越司法部门而由皇帝直接指挥
D. 表明明朝对官吏监视和对人民镇压的加强
设f(x,y)存在一阶偏导数,且f(1,1)=1,f’x(1,1)=2,f’y(1,1)=1,又φ(x)=f(x,f(x,f(x,x))),则φ’(1)=______。
(61)Inns have served travelers since ancient times. (62)The emergence of the hotel as a significant commercial institution, however, is a development of the past few centuries and may be traced by, example in the U.S.. The location of hotels has always been related to the transportation available. During colonial times hotels were usually situated in seaport towns, but by the end of the 18th century, when the coach had increased travel within the U. S., many inns and hotels were constructed to offer lodgings along highway routes. (63)After the construction of railroads in the 19th century, larger hotels were built near railroad stations to accommodate railway travelers. (64)Standards of service and comfort rose appreciably and in the larger cities the types of lodging offered by certain hotels became luxurious. The old Waldorf- Astoria Hotel in New York City and the Brown Palace in Denver, Colorado, were among the first such luxury hotels, but their rates were too high for the average traveler. (65)Shortly before World War I large hotels offering many services at prices within the reach of middle-income groups were constructed. The first such institution was the Statler Hotel in Buffalo, New York, which opened in 1908. For years it served as a model for other large-city transient hotels.
Passage 4 New Year’s Eve Entertainment Dec. 31,1997 Program Items Performed by Females Chorus: We Love China Dept. Singing Group Folk Dance: Plucking Tea Class I, Grade 3 Recitation: Romeo and Juliet Henderson Joan Skit: Necklace Grade 4 Popular Song: Love Li Yan Male Solo: The Sun and the Moon More, with Piano Accompaniment by Alice Comic Dialogue: Studying Tony, Joseph Beijing Opera Juggling Ma Guang Story: The Six Blind Men and the Elephant Han Lei Ballet: The Swan Lake Catherine, Sophia, Wang Hua, Li Ying Modern Dance Liu Jun and others Suona: A Rich Harvest Zhao Chang Sheng Ballroom: Dancing Waltz Zhang Han, Li Na and Others Now please find correct English expressions in the diagram to fill in the following translations: A) Recitation: Romeo and Juliet B) Folk Dance: Plucking Tea C) Beijing Opera D) Comic Dialogue E) Females Chorus F) Skit: Necklace G) Juggling H) Ballet: The Swan Lake I) Modern Dance J) Ballroom: Dancing Waltz ( )诗歌朗诵:罗密欧与朱利叶 ( )女生合唱