皮皮学,免费搜题
登录
搜题
【简答题】
下列给定,函数fun()的功能是:根据输入的3个边长(整型值),判断能否构成三角形:若能构成等边三角形,则返回3,若是等腰三角形,则返回2,若能构成三角形则返回1,若不能,则返回0。 请改正的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: include <math. h> int fun(int a, int b, int c) { if (a+b>c&&b+c>a&&a+c>b) { if (a==b&&b==c) /*************found**************/ return 1; else if(a==b|| b==c||a==c) return 2; /*************found**************/ else return 3; } else return 0; } main ( ) { int a,b, c, shape; printf('/nInput a,b,c: '); scanf ('%d%d%d', &a, &b, &c); printf ('/na=%d, b=%d, c=%d/n',a,b,c); shape=fun (a,b, c); printf ('/n/nThe shape : %d/n', shape); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】The brain waves are the slowest during ____ A) stage 1  B) stage 2 and stage 3  C) stage 4 D) REM sleep 本题为单选题,
【单选题】From the information below, calculate the accounting break-even point. Initial investment: $2,000 Fixed costs are $2,000 per year Variable costs: $8 per unit Depreciation: $300 per year Price: $25 per...
A.
88 units per year
B.
89 units per year
C.
92 units per year
D.
136 units per year
【判断题】客户服务的方式,是"平等互利,共同发展"。
A.
正确
B.
错误
【简答题】以G.J.Myers的观点,简述对软件测试的目的。
【判断题】圆形振荡筛网的运动方向具有三维性质
A.
正确
B.
错误
【判断题】超星电子书首页上是否显示有超星电子书的网址?
A.
正确
B.
错误
【单选题】The author's attitude towards Larry Myers' work is ______.
A.
cautious
B.
approving
C.
suspicious
D.
overenthusiastic
【单选题】超星电子书的网址是?
A.
www.duxiu.com
B.
ss.library.com
C.
sslibrary.com
【单选题】Given the following information, calculate the present value break-even point. Initial investment: $2,000 Fixed costs: $2,000 per year Variable costs: $6 per unit Depreciation: $250 per year Price: $2...
A.
100 units per year
B.
143 units per year
C.
202 units per year
D.
286 units per year
【单选题】超星电子书的网址是?
A.
www.sslibrary.com
B.
www.sslib.com
C.
www.salibrary.com
D.
www.stlibrary.com
相关题目: