求图示三根绳子AB、AC、AD的拉力。[img=712x511]1802f400a538cc1.png[/img]
A: FAC=900N, FAD=464N, FAB=693N
B: FAC=646N, FAD=900N, FAB=693N
C: FAC=646N, FAD=693N, FAB=900N
D: FAC=693N, FAD=900N, FAB=464N
A: FAC=900N, FAD=464N, FAB=693N
B: FAC=646N, FAD=900N, FAB=693N
C: FAC=646N, FAD=693N, FAB=900N
D: FAC=693N, FAD=900N, FAB=464N
举一反三
- 使用递归函数计算n!(n=0,1,2,3,…)的是______ A: fac(int n) if(n==0)return 1; else for(i=1;i<=n;i++)f*=i; return f; } B: fac(int n) { if(n==0‖n==1)return 1; else return n*fac(n-1); } C: fac(int n) {int i=1,f=1; if(n==0)return 1; else do{f*=i;}while(i++<n); return f; } D: fac(int n) {int i=1,f=1; if(n==0)return 1; else while(1<=n)f*=i++; return f;
- 使用递归函数计算n!(n=0,1,2,3,……)的是( ) A: fac(int n) B: int i,f=1; C: if(n==0)return 1; D: else for(i=1;i<=n;i++)f*=i; E: return f; F: fac(int n) G: if(n==0||n==1)return 1; H: else return n*fac(n-1); I: fac(int n) J: int i=1,f=1; K: if(n==0)return 1; L: else while(i<=n)f*=i++; M: return f; N: fac(int n) O: int i=1,f=1; P: if(n==0)return 1; Q: else dof*=i;while(i++<n); R: return f;
- 下面程序尝试使用空间换取时间的策略实现第1至100项中任意菲波那切数列的求解,请填空完善程序。# include <stdio.h># define N 100int fab[N]={-1};int Fab(int n){if (___________){if ((n==1)||(n==2))fab[n]=1;elsefab[n]=Fab(n-1)+Fab(n-2);}return fab[n];}int main(){int n;scanf("%d",&n);printf("%d",Fab(n));return 0;}?
- 运行下面程序,变量y的值是: long fac( int n) { long f; if (n==0) f=1; else f=n* fac(n-1); return f; } void main { long y; y=fac(4); }
- 从键盘输入一个正整数n,计算n!的值。要求定义和调用函数fac(n),计算n!