阅读程序,回答下列问题:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #include<iostream> #include<cmath> using namespace std; double f(double a,double b,double c){ double s=(a+b+c)/2; return sqrt(s*(s-a)*(s-b)*(s-c)); } int main(){ cout.flags(ios::fixed); cout.precision(4); int a,b,c; cin>>a>>b>>c; cout<<f(a,b,c)<<endl; return 0; } |
0 of 5 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 5 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、当输入为 2 2 2
时,输出为1.7321
( )
2、将第7行中的 (s-b)*(s-c)
改为 (s-c)*(s-b)
不会影响程序运行的结果( )
3、程序总是输出四位小数( )
4、当输入为 3 4 5
时,输出为( )
5、当输入为 5 12 13
时,输出为( )