解题思路:
注意事项:
参考代码:
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { int a,b,c; while(cin>>a>>b>>c){ if(a+b>c&&a+c>b&&b+c>a)//三角形任意两边之和大于第三边 cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题10.7 (C++代码)(都说了scanf和gets一般不要混着用)浏览:1126 |
点我有惊喜!你懂得!浏览:1337 |
C语言训练-排序问题<2> (C++代码)(sort函数)浏览:1580 |
简单的a+b (C语言代码)浏览:494 |
简单的a+b (C语言代码)浏览:726 |
2005年春浙江省计算机等级考试二级C 编程题(3) (C语言代码)浏览:390 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:901 |
不容易系列2 (C语言代码)浏览:597 |
字符串对比 (C语言代码)浏览:1413 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:464 |