洛谷 P5717 【深基3.习8】三角形分类
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P5717 【深基3.习8】三角形分类
在文件 luogu.h 第 221 行定义.
◆ main()
int luogu::P5717::main |
( |
istream & |
cin, |
|
|
ostream & |
cout |
|
) |
| |
|
static |
在文件 luogu.cpp 第 588 行定义.
590 cin >> e[0] >> e[1] >> e[2];
592 if(e[0] + e[1] <= e[2]) {
593 cout <<
"Not triangle" << endl;
595 const unsigned int e02 = e[0] * e[0];
596 const unsigned int e12 = e[1] * e[1];
597 const unsigned int e22 = e[2] * e[2];
598 if(e02 + e12 == e[2] * e[2]) {
599 cout <<
"Right triangle" << endl;
600 }
else if(e02 + e12 > e22) {
601 cout <<
"Acute triangle" << endl;
602 }
else if(e02 + e12 < e22) {
603 cout <<
"Obtuse triangle" << endl;
606 cout <<
"Isosceles triangle" << endl;
608 cout <<
"Equilateral triangle" << endl;
该类的文档由以下文件生成: