题目内容

下列给定程序中函数fun()的功能是计算1/n!的值。 例如:给n输入5,则输出0.0083330 请改正程序中的错误,使它能得到正确结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include <stdio.h> #include <conio.h> /******+****found*************/ int fun(int n) double result=1.0; if(n==0) return 1.0; while(n>1 && n<170) /**********found************/ result *=n++; result=1/result; return result; main() int n; printf("Input N:"); scanf("%d",&n); printf("\n1/%d!=%If\n",n,fun(n));

查看答案
更多问题

The passage aims to tell parents some secrets on how to help their child become an outstanding student.

危险化学品安全技术 窒息涉及对身体组织氧化作用的干扰。这种症状分为三种,但不包括( )。

A. 单纯窒息
B. 复杂窒息
C. 血液窒息
D. 细胞内窒息

具有“化湿行气,温中止呕,止泻,安胎”功效的是( )

A. 苍术
B. 佩兰
C. 藿香
D. 厚朴
E. 砂仁

建筑工程施工安全技术 多台水泵并列安装时,间距不小于( )。

A. 60cm
B. 80cm
C. 100cm
D. 120cm

答案查题题库