函数这一块
2025-10-20 22:49:58
发布于:福建
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int a,b,c;
bool iftriangle(int x,int y,int z){
if(x + y > z && x + z > y && y + z > x){
if(abs(x - y) < z && abs(x - z) < y && abs(y - z) < x){
return 1;
}
}
return 0;
}
int main () {
cin >> a >> b >> c;
if(iftriangle(a,b,c)){
if(a == b && b == c && a == c){
cout << "aaa";
}else if(a == b || b == c || a == c){
cout << "aab";
}else{
cout << "abc";
}
}else{
cout << "error";
}
return 0;
}
这里空空如也



有帮助,赞一个